Insert data from Access or other data source

You can use a query (query: A question about the data stored in your tables, or a request to perform an action on the data. A query can bring together data from multiple tables to serve as the source of data for a form or report.) to import data from a Microsoft Access database or other data source. You can also use queries to sort and filter your data during the import process.

To keep the data in your document up to date, you can create a link to the data source. Whenever the data is changed in the source file, Microsoft Word can automatically update it in your Word document.

ShowInsert information into an existing document

  1. In the Word document, click where you want to insert the contents of the table or query.
  2. Display the Database toolbar (toolbar: A bar with buttons and options that you use to carry out commands. To display a toolbar, press ALT and then SHIFT+F10.), and then click Insert Database Button image.
  3. Click Get Data.
  4. Choose how to retrieve, filter, and sort the data by doing one of the following:

ShowBrowse for the file

  1. In the Look in box, click the location of the data source you want to use.
  2. In the Files of type box, click the type of data source you want to use. If you know the file name but not the file type, select All Data Sources.
  3. Click the data source file, and then click Open.
  4. In the Select Table dialog box, if available, click the table or query you want, and then click OK.
  5. To choose a subset of the records or fields or both to include in the Word table, click Query Options, and then select the criteria you want.

ShowHow?

To select specific data records (data record: A complete set of related information that corresponds to one row of information in the data source. All information about one client in a client mailing list is an example of a data record.) to merge, you can choose selection criteria (or "rules") on the Filter Records tab in the Query Options dialog box. For each rule, you need to specify:

For example, to select only the data records of Seattle customers, specify the City data field, use the comparison phrase Equal to, and type the text Seattle.

  1. Click OK.

ShowUse Microsoft Query

  1. On the Tools menu in the Select Data Source dialog box, click MS Query.
  2. Construct your query.

 Note   If you want help with Microsoft Query, close the Choose Data Source dialog box, and then click Microsoft Query Help on the Help menu.

ShowUse the Data Connection Wizard

Use the Data Connection Wizard to connect to databases on computers that are running Microsoft SQL Server and other database management systems. You can also use the Data Connection Wizard when you need to choose a specific database driver or ODBC data source name (DSN).

  1. In the Select Data Source dialog box, click New Source, and follow the directions in the Data Connection Wizard.
  2. Click the data source in the Select Data Source dialog box, and then click Open.
  3. To choose a subset of the records or fields or both to include in the Word table, click Query Options, and then select the criteria you want.

ShowHow?

To select specific data records (data record: A complete set of related information that corresponds to one row of information in the data source. All information about one client in a client mailing list is an example of a data record.) to merge, you can choose selection criteria (or "rules") on the Filter Records tab in theQuery Options dialog box. For each rule, you need to specify:

For example, to select only the data records of Seattle customers, specify the City data field, use the comparison phrase Equal to, and type the text Seattle.

  1. Click OK.
  1. To customize the Word table formatting, click Table AutoFormat, select the options you want, and then click OK.
  2. Click Insert Data.
  3. Under Insert Records, select the records to include in the Word table.
  4. If you want to be able to update the data in the Word table when the source data changes, select the Insert data as field check box.

Word inserts the data in the Word table as a DATABASE field (field: A set of codes that instructs Microsoft Word to insert text, graphics, page numbers, and other material into a document automatically. For example, the DATE field inserts the current date.), which is linked to the source table or query. To update the field, click in the table and press F9.

ShowExport Access data into a new document

To transfer Access data to a new Word document, export an Access table, query, report, or other database object. Then you can use Word to format and edit the data, or you can use the data as a mail merge data source.

  1. In Access, open the database you want, and then open a database object: either a table, query, form, or report.
  2. To export part of the data only, select the rows or columns you want.
  3. On the File menu, click Export.
  4. In the Save as type box, choose a file format for the exported data:
    • To create a document that preserves the data's original formatting, click Rich Text Format.
    • To create a plain text file for use as a mail merge data source, click Microsoft Word Merge.
  5. In the File name box, specify a file name for the new document.
  6. To export the entire database object, click Export All.

Export All is not available unless a you open database object, such as a table or query.

If you chose Text Files, you can export selected specific rows or columns in the data. Click the arrow next to Export All ,and then click Save Selection.

 
 
Applies to:
Word 2003