Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Automatically Running a Macro.
by Allen Wyatt
(last updated July 22, 2017)
You know that you can create macros within Word that allow you to automate many different functions. You may not know, however, that you can create macros that perform tasks without any intervention on your part. For instance, you can create a macro that Word will run automatically whenever you create a document; whenever you use the New command, this macro will run.
These special macros that automatically run at predefined times are identified by special names. Otherwise, there is nothing different between these macros and any other you may write. Here are the names you can give macros so that they will run automatically.
|Macro Name||When It Runs|
|AutoNew||Whenever you create a new document|
|AutoClose||Whenever you close a document|
|AutoExec||Whenever you start Word|
|AutoExit||Whenever you exit the program|
|AutoOpen||Whenever you open a document|
Remember that these macros, in order to be used effectively, must be saved within a DOCM document. (That is, within a document that is "macro enabled.") They cannot be saved in a DOCX document, as such documents cannot contain macros at all.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9388) applies to Microsoft Word 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Word here: Automatically Running a Macro.
Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!
When creating macros, it is sometimes necessary to know how many documents are open in Word. This is relatively easy to do ...Discover More
In some documents Roman numerals might be used quite a bit. If you ever want to change the Roman numerals to their Arabic ...Discover More
Macros can be used to perform all sorts of tasks within Word. Some tasks can even occur at whatever time interval you desire. ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.