WD95: How to Use Microsoft Access 95 Data in Word

ID: Q193718


The information in this article applies to:
  • Microsoft Word for Windows 95, versions 7.0, 7.0a


SUMMARY

This article explains how to do the following:

  • How to Use a Microsoft Access Query or Table as a Word Data Source.


  • How to Use MS Query to Retrieve MS Access Data as a Data Source in Word.


  • How to Export and Use Your Data From MS Access as a Word Data Source.


  • How to Copy, Paste, and Use Microsoft Access Data as a Word Data Source.



MORE INFORMATION

Use the procedure appropriate for your situation:

How to Use a Microsoft Access Query or Table as a Word Data Source

To use a Microsoft Access query or table as a Word data source, follow these steps:

  1. If you want to use the results of a Microsoft Access query or table as your data source in a Word mail merge, in the Mail Merge Helper (on the Tools menu, click Mail Merge), click Get Data and then click Open Data Source.
    -or-
    If you want to insert the results of a Microsoft Access query or table in a Word document, in the Database dialog box (on the Insert menu, click Database), click Get Data.


  2. In the Open Data Source dialog box, follow these steps:


    1. Change the Files of Type box to "MS Access Databases."


    2. Click to select your Microsoft Access database file.


    3. Click to select the Select Method check box.


    4. Click Open.


  3. In the Confirm Data Source dialog box, select "MS Access Databases via DDE (*.mdb)," and then click OK.

    NOTE: If "MS Access Databases via DDE (*.mdb)" is not available, you will need to remove and then reinstall Microsoft Access for Windows 95.


  4. In the Microsoft Access dialog box, select the Queries tab or the Tables tab.


  5. Select the query or table you want to use, and then click OK.

    NOTE: On the Queries tab, the Create Link check box is selected by default. This option creates a link to the Microsoft Access database query. Select this check box to always retrieve the most up-to-date version of any of the listed queries. To ignore changes to the original query instructions, clear the Link to queries check box.


  6. You will receive the results of your Microsoft Access query or table in your Word document.

    If you are using mail merge, you will be prompted with the following message:
    Word found no merge fields in your main document. Choose the Edit Main Document button to insert merge fields into your main document.

    Click Edit Main Document and continue your mail merge as usual.
    -or-
    If you are inserting database information, in the Database dialog box, click Insert Data. In the Insert Data dialog box, select either All to insert all of the results of the Microsoft Access query into your Word document or select From and specify which records you want to insert into your Word document.

    NOTE: In the Insert Data dialog box, the "Insert data as field" is not selected by default. If selected, this option inserts the data into the table as a field. Select this check box if you want to update the data in your Word document whenever the data source changes.


How to Use MS Query to Retrieve MS Access Data as a Data Source in Word

To use Microsoft Query to retrieve Microsoft Access data as a data source in Word, follow these steps:

  1. If you want to use the results of a Microsoft Access query or table as your data source in a Word mail merge, in the Mail Merge Helper (on the Tools menu, click Mail Merge), click Get Data and then click Open Data Source.
    -or-
    If you want to insert the results of a Microsoft Access query or table in a Word document, in the Database dialog box (on the Database toolbar, click Insert Database), click Get Data.

    NOTE: To access the Database toolbar, on the View menu, point to Toolbars and then click Database.


  2. In the Open Data Source dialog box, click MS Query.


  3. In the Select Data Source dialog box, select "MS Access 7.0 Database," and then click Use.


  4. In the Select Database dialog box, select the Microsoft Access database file that you want to use, and then click OK.

    NOTE: If you select the Read Only check box, you will be able to read the file but cannot make changes to it. If you select the Exclusive check box, the database file will be locked during the time Word is using the Microsoft Access database.


  5. In the Add Tables dialog box, select what you want to use for your query and click Add. Select each item (table or query) and add them to your query and then click Close.


  6. In Microsoft Query, drag either the table or query field name (or the asterick (*) if you want all of the field names) from the Table pane to the Data pane.

    For more information about the Query Window, click Contents on the Help menu in Microsoft Query Help, and then under Reference, click Query Window.


  7. After you have completed your query, on the File menu click "Return Dat to Microsoft Word."


  8. If you are using mail merge, MS Query will return you to the Mail Merge Helper. Click Close and then insert your merge fields and continue your mail merge as usual.
    -or-
    If you are inserting database information, in the Database dialog box, click Insert Data. In the Insert Data dialog box, select either All to insert all of the results of the Microsoft Access query into your Word document or select From and specify which records you want to insert into your Word document.

    NOTE: In the Insert Data dialog box, the "Insert data as field" is not selected by default. If selected, this option inserts the data into the table as a field. Select this check box if you want to update the data in your Word document whenever the data source changes.


How to Export and Use Your Data From MS Access as a Word Data Source

To export and use your data from Microsoft Access as a Word data source, follow these steps:

  1. Open your Microsoft Access database table or query.


  2. On the File menu, click Save As/Export.


  3. In the Save As dialog box, select "To an External File or Database" and then click OK.


  4. In the Save dialog box, follow these steps:


    1. Change the Save as type box to "Microsoft Word Merge".


    2. In the File name box, type a name for your exported file.


    3. In the Save in box, change to the folder that you want to save the file.


  5. Click Export. Microsoft Access will now export your table or query result as a tab-delimited text file.


  6. Close your database and quit Microsoft Access.


In Microsoft Word 95, continue your Word mail merge, or insert your database file as usual.

How to Copy, Paste, and Use Microsoft Access Data as a Word Data Source

To copy, pastes, and use Microsoft Access data as a Word data source, follow these steps:

  1. Open your Microsoft Access database table or query.


  2. On the Edit menu, click Select All Records.


  3. On the Edit menu, click Copy.


In Microsoft Word 95, following these steps:

  1. On the File menu, click New.


  2. On the General tab, select the Blank Document icon and then click OK.


  3. In your document, use one of the following methods:


  4. Method 1: Save Data in Table Format

    1. On the Edit menu, click Paste. The information from your Microsoft Access table or query will be pasted into a Word table.


    2. Save (on the File menu, click Save As) this new file as (Save as type) "Word document." This new file will be your new Word data source.


    Method 2: Save Data in Tab-delimited Format

    1. On the Edit menu, click Paste Special.


    2. In the Paste Special dialog box, select Unformatted Text and then click OK. The information from your Microsoft Access table or query will be pasted into your Word document as tab-delimited text.


    3. On the File menu, click Save As.


    4. In the Save As dialog box, change the Save as type box to "Text Only."


    5. In the File name box, type a name for your exported file.


    6. In the Save in box, change to the folder that you want to save the file and then click Save.


  5. Close your Word data source document and continue your Word mail merge, or insert your database file as usual.



REFERENCES

For additional information, please see the following articles in the Microsoft Knowledge Base:

Q187383 WD: How to Start a Mail Merge

Q187639 WD: How to Design and Set Up Mail Merge Data Sources
For more information about inserting a database into your Word document, click Answer Wizard on the Help menu, click the Index tab in Microsoft Word Help, type the following text
databases, Microsoft Access
and then double-click the selected text to go to the "Insert a Microsoft Access table or query as a Word table" topic.

Additional query words: datasource msaccess msquery

Keywords : kbdta kbmerge word7 word95
Version : WINDOWS:7.0,7.0a
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: September 28, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.