WD97: Macro to Add a Command Button with Code to a Document (185186)
The information in this article applies to:
- Microsoft Word 97 for Windows
This article was previously published under Q185186 SUMMARY
The following Visual Basic for Applications sample code will give you
user-
intervention between macros.
This sample code runs in the following sequence:
- The sample adds a command button to an open Word document.
- It adds code from a text file to the current project.
NOTE: In this example, the code that is copied to the document project
is the Click event for the command button.
- When the command button is clicked, another macro is run.
- The button and code are removed from the document.
REFERENCES
For more information about getting help with Visual Basic for
Applications,
please see the following article in the Microsoft Knowledge Base:
163435 VBA: Programming Resources for Visual Basic for Applications
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbinfo kbProgramming KB185186 |
---|
|