ACC: Exporting Tables from MS Word with AccessExporter Macro

Last reviewed: June 3, 1997
Article ID: Q122247
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0

SUMMARY

Advanced: Requires expert coding, interoperability, and multiuser skills.

Microsoft Word version 6.0 for Windows contains a macro called AccessExporter that you can use to export tables from Word to Microsoft Access. The AccessExporter macro is in the TABLES.DOT template included in Word 6.0. Templates are usually installed in the /Macros subdirectory.

MORE INFORMATION

The AccessExporter macro exports the selected portion of a Word table to a Microsoft Access table. When you run the macro, you are prompted for the name of the Microsoft Access database to which you want to export the table. You can export the Word table to an existing Microsoft Access table, or you can have the macro create a new table in Microsoft Access. You can also specify whether the first row in the Word table contains the table's field names.

The following steps demonstrate how to use the AccessExporter macro to export a table from Word 6.0 to Microsoft Access:

  1. Start Word 6.0 and open the document that contains the table you want to export to Microsoft Access.

  2. On the File menu, click Templates, and then click Add.

  3. In the Directories box, select the WINWORD\MACROS subdirectory. In the File Name box, select the TABLES.DOT file. Click OK, verify that the TABLES.DOT file is listed in the Global Templates And Add-ins box, and then click OK again.

  4. Click anywhere in the table you want to export, and then click Select Table on the Table menu. (Or, use the mouse to select the portion of the table you want to export.)

  5. On the Tools menu, click Macro. In the Macro Name box, select AccessExporter, and then click Run.

  6. In the File Name box, select the Microsoft Access database to which you want to export the Word table, and then click OK.

  7. In the Export Table Options dialog box, select the appropriate options. Click Help for a description of each option. Click OK when you are ready to export the table.

The macro functions by exporting the selected portion of the Word table to a delimited text file, and then importing the text file into the Microsoft Access database. If you choose to create a new table in Microsoft Access, the table will be called Winword.


Keywords : IntpOthr kbinterop
Version : 1.0 1.1 2.0 7.0
Platform : WINDOWS
Hardware : X86
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.