Browse » Home
Saturday, August 18, 2012
How to Make a Word Macro Run Upon Opening a Document
1. Open Microsoft Word 2007.
2. Write the steps for the macro that you want to create. Rehearse the keystrokes if necessary.
3. Click the "Office" button. Select "Word Options," and then select the "Popular" option.
4. Select the "Show Developer Tab in the Ribbon" check box from the "Top Options for Working with Word" section of the screen. When finished, click the "OK" button.
5. Click the "Developer" tab. Select the "Record Macro" button near the top-left corner of the window.
6. Enter the name for the macro. If you want the macro to run automatically, you must name it with one of Microsoft’s reserved special names. “AutoNew” macros run when a new document is opened. “AutoOpen” macros run each time an existing document is opened. “AutoClose” macros run each time a document is closed. “AutoExit” macros run each time you exit from Word or when you close a global template (such as “normal.dotm”). If you want the macro to run every time Word opens, specify “AutoExec” as the file name.
7. Decide where to save the macro. If you want the macro to run every time Word is opened, save it in the normal.dotm file, or another template file that is opened every time you start Word. (Every time you open Word, a new or existing document appears. Since all documents are, by default, based on the normal.dotm template, placing the macro there will allow it to run each time you open Word.)
8. Enter a description for the macro, and then click the "OK" button. Word will begin to record the macro when you click the "OK" button. Use the notes you wrote in Step 2 to guide you as you complete the sequence of tasks for the macro.
9. When you complete the steps for the macro, click the "Stop Recording" option in the Developer area.
10. Save and close the document, and then exit from MS Word.
11. Reopen Word to check that your macro runs automatically.