bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Macros > WordBasic Examples > Automatically Running a Macro

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.

Tip #121 applies to Microsoft Word versions: 97 | 2000 | 2002 | 2003

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!

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Tips.Net Store

WordTips FAQ
WordTips Premium

Learn Access Now

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

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)