ACC: Running a Microsoft Word Macro Using AutomationLast reviewed: August 28, 1997Article ID: Q154570 |
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 7.0 macro. For more information about running a Microsoft Word 97 macro through Automation, please see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q160294 TITLE : ACC: Running a Microsoft Word 97 Macro Using 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 INFORMATIONThrough Automation, it is possible to run a Microsoft Word macro. This example uses the WordBasic ToolsMacro statement in Microsoft Word.
Example - Run a Microsoft Word 7.0 MacroThe following example opens a Microsoft Word document called Wordtest.doc and runs a macro, Macro1, which currently exists in the default template. The following code examples assumes that you have created a document named WordTest.Doc in the C:\My Documents folder and that you have created a macro named Macro1 in the default template. To run this code:
Example - Run a Microsoft Word 7.0 Macro in a Form's Object FrameThis procedure activates an embedded Microsoft Word object on a form and runs a macro named Macro1 which currently exists in the Microsoft Word default template. The following code assumes you have created a document named WordTest.Doc in the C:\My Documents folder and that you have created a macro named Macro1 in the Microsoft Word default template. To run this code:
REFERENCESFor more information about using Automation, search the Help Index for "Automation," or ask the Microsoft Access 97 Office Assistant. Keywords : AutoGnrl kbinterop PgmHowTo IntpOleA Version : 7.0 97 Platform : WINDOWS Hardware : x86 Issue type : kbhowto |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |