How to execute macro when starting Word?

H

hstijnen

Hi,
I want to execute some code when starting Word. In a template this can be
done with AutNew() macro. But an AutoNew() macro in Normal.dot doesn't fire.
I've created a sub Document_New() in the ThisDocument module of Normal.dot
and this fires when I start a new blank document via File | New. But when I
start Word via Start button or toolbar it doesn't work.
What to do in the last situation?

Thanks for help
Regards,
Henk
 
C

Charles Kenyon

When you start Word, you want to use an AutoExec macro. This runs when Word
starts, but not every time new documents are created.
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 
T

Tony Jollans

Strictly speaking an AutoExec in Normal.dot runs when Normal.dot is loaded.
When Word starts up, this happens before the default new document is created
so it depends what you are trying to do whether or not it will be suitable.

The only event which fires at start up after the new document is created is
the Application DocumentChange event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top