ACC: Using Automation to Run Word 97 Mail Merge from MS AccessLast reviewed: November 21, 1997Article ID: Q159328 |
The information in this article applies to:
SUMMARYAdvanced: Requires expert coding, interoperability, and multiuser skills. This article demonstrates how to use Automation to run a Microsoft Word 97 for Windows mail merge in Microsoft Access version 7.0 or 97. For information about how to run a Word 7.0 mail merge in Microsoft Access 7.0, please see the following article here in the Microsoft Knowledge Base:
ARTICLE-ID: Q154571 TITLE : ACC95: Running Word Mail Merge from Access Using OLE AutomationThis article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of the "Building Applications with Microsoft Access" manual.
MORE INFORMATIONWord 97 takes advantage of the Visual Basic for Applications object hierarchy used in other Microsoft Office applications. Word 7.0 and earlier versions used a flat command model called WordBasic. Using Automation, you can perform a mail merge in a Microsoft Word 97 document from Microsoft Access. The example in this article uses the OpenDataSource and Execute methods of the MailMerge object in Word 97.
Example: Mail Merge a Microsoft Access Query with a Word 97 DocumentThe following example opens a Word 97 document called C:\MyMerge.doc and executes a mail merge using the Customers table in the Microsoft Access sample database Northwind.mdb as its data source. The following sample code assumes that the main document for the merge, C:\MyMerge.doc, already exists.
REFERENCESFor more information about Automation, search the Help Index for "Automation," or ask the Microsoft Access 97 Office Assistant. For information about using the Microsoft Access Object Browser to explore the methods and properties of Microsoft Word 97 Visual Basic for Applications objects, search the Help Index for "Automation, using the Object Browser," or ask the Microsoft Access 97 Office Assistant. Keywords : kbinterop kbualink97 IntpOleA Technology : kbole Version : 7.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |