WD2000: Auto Macros in Word
This article was previously published under Q211659
This article has been archived. It is offered "as is" and will no longer be updated.
Word reserves special names for macros that you can create to alter the wayWord behaves. These are called auto macros. The auto macros in MicrosoftWord are:
Word recognizes a macro whose name begins with Auto as a macro that runs automatically when the situation to which it applies arises. You supply the actual steps for the auto macro by either writing or recording the macro.
You can prevent an auto macro from running by holding down the SHIFT keywhen you perform the action that triggers the macro.
NOTE: There are also a variety of startup switches that can be used with Word.
For more information about startup switches, click Microsoft Word Help on the Help menu, type Control what happens when you start Microsoft Word in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Description of Auto Macros
AutoExecThe AutoExec macro runs when you start Word. This macro makes it easy toinstruct Word to automatically make adjustments when you start Word. Forexample, you can create an AutoExec macro that automatically changes thedefault directory when you open Word for Windows.
The AutoExec macro runs when Word starts if the AutoExec macro was saved as part of the default (Normal.dot) template or if it was saved as part of a global add-in.
To prevent AutoExec from running, type
winword /minto a command prompt to start Word.
AutoNewThe AutoNew macro runs after you create a new document based on a current template. For example, an AutoNew macro can update all the fields in a document, attached to a template of choice, and then run when you open a new document based on that template. The AutoNew macro runs when New is selected on the File menu in Word if the AutoNew macro was saved as part of the current template.
The AutoNew macro does not run if the AutoNew macro was saved as part of aglobal add-in. The AutoNew macro is available when you select Macros onthe Tools menu.
AutoOpenThe AutoOpen macro runs after you open a file with the FileOpen or FileFindcommand, or from the list of the last four documents that were opened(see the bottom of the File menu).
The AutoOpen macro runs when Open is selected on the File menu, and theAutoOpen macro was saved as part of the current template.
The AutoOpen macro does not run if the AutoOpen macro was saved as part ofa global add-in. The AutoOpen macro is available when Macros is selected onthe Tools menu.
AutoCloseThe AutoClose macro runs when you close a document. The AutoClose macroruns when Close is selected on the File menu, and the AutoClose macrowas saved as part of the current template.
The AutoClose macro does not run if the macro was saved as part of a globaladd-in. The AutoClose macro is available when Macros is selected on theTools menu.
AutoExitThe AutoExit macro runs when you quit Word.
The AutoExit macro runs when Word quits if the macro was saved as part ofthe default (Normal.dot) template or when saved as part of a template thathas been added into the Startup folder or added as a global template.
For more information about global add-ins, click Microsoft Word Help on the Help menu, type global add-ins in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.
Article ID: 211659 - Last Review: 12/05/2015 11:44:25 - Revision: 1.0
Microsoft Word 2000 Standard Edition
- kbnosurvey kbarchive kbinfo kbtemplate kbfaq KB211659