
Tips.Net > WordTips Home > Macros > WordBasic Examples > Automatically Running a Macro
Summary: Most Word users know that you can create macros that allow you to automate most aspects of the program. What you may not know is that Word’s macro capabilities include special macros that will run at specific times, such as when you open, close, or create a document. This tip covers all these special types of macros you can create. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)
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 |
Step Up and Take Control! Subscribers to WordTips know just how valuable a resource it is. WordTips Premium provides twice the number of exceptional, easy-to-understand tips every week in an ad-free newsletter, as well as substantial discounts on WordTips archives and e-books.
Check out WordTips Premium today!
Learn to search for and replace text, formatting, graphics, and special characters the easy way with WordTips: Find and Replace. (more information...)
Ask a Word Question
Make a Comment
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips