Article ID: 159328 - Last Review: January 19, 2007 - Revision: 3.3 ACC: How to Use Automation to Run Word 97 Mail Merge from AccessThis article was previously published under Q159328 On This PageSUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.
This article shows you 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: 154571
(http://support.microsoft.com/kb/154571/EN-US/
)
ACC95: Running Word Mail Merge from Access Using OLE
Automation
This 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 INFORMATION
Word 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.
By 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 runs a mail merge by 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.
REFERENCES
For 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. APPLIES TO
| Article Translations
|


Back to the top
