Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word: Macro don't works with ".dot" documents?

Status
Not open for further replies.

zoomby

Programmer
Aug 5, 2002
60
DE
hi!

I have written a macro for a word document. But when I save the document with ".dot" the macro doesn't start.
How can I solve the problem?

bye
chris
 
You may want to try assigning the macro an AutoExec, AutoOpen name in the .DOT file you reference.

When do you want this macro to start? All the time? Then assign it to the Normal.dot template.

Geeky Grandma

 
thanks for the reply. Now I have a Module "AutoOpen" with the function "Public Sub MAIN()" in the "Normal" section, but the Macro still doesn't start.
What's wrong?

bye
chris
 
I think you want the sub to be called "AutoNew". This will start the macro anytime a new document is created based on that template. The macro should be stored in the template only. If you name it AutoOpen, it will run every time you open a document created with that template. Always store the AutoNew and AutoOpen macros in the templates not in Normal.dot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top