The information in this article applies to:
SUMMARYWith the MACROBUTTON field in Microsoft Word for Windows, you can create a button in your document that invokes a macro when you double- click it. The syntax of this field is as follows
where macroName is the name of the macro you want the button to invoke,
and buttonText is the text or graphic you want to serve as the button
in the document. To insert the field braces, press CTRL+F9.
When you display the result of the MACROBUTTON field, either the text or graphic that you specified as the buttonText instruction is displayed. Word automatically updates the field's result whenever you edit the field. If you have a mouse, double-click the text or graphic returned by the MACROBUTTON field to run the macro specified in the field's macroName argument. If you don't have a mouse, use the keyboard to select the text or graphic returned by the MACROBUTTON field, and press ALT+SHIFT+F9 to run the specified macro. MORE INFORMATIONThere are two ways to use a graphic (instead of text) to represent the button. The first is to use a separate graphic file, and the second is to include the graphic directly in the document. Method 1To use a separate graphic file, in Word version 6.0, the syntax is as follows:
The IMPORT or INCLUDEPICTURE field code is a field code you insert
within the MACROBUTTON field telling the program to insert the
referenced graphic file. The advantage of this method is that the
graphic does not increase the size of your document.
To use a separate graphic file, the field code syntax is as follows for Word versions 1.0 and 2.0:
Method 2You can also insert the button graphic directly into your document:
REFERENCES
"Word for Windows Companion, Second Edition," pages 555-58
Additional query words: 1.x 2.x 7.0 word95 word6 word7 6.0 winword2 word97 winword
Keywords : kbfield |
Last Reviewed: October 6, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |