MacroButton
The MACROBUTTON field inserts a button in your text that, when double-clicked, runs a specified macro and inserts the results in your document.
Syntax
{ MACROBUTTON macroname displaytext }
The "macroname" can be any macro currently accessible to Word; in other words, any macro in an active template.
Examples
You can use Macrobutton to insert a button that runs any macro you create or a command that comes with Word. To display the message "Print One Copy Now," and attach the command "FilePrintDefault," which does just that when clicked:
{ MACROBUTTON FilePrintDefault Print One Copy Now }
→ For more information about recording and writing macros, see Chapter 31, "Recording and Running Visual Basic Macros".
Get Special Edition Using Microsoft® Word 2000 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.