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!

Auto_Open will not execute!! 1

Status
Not open for further replies.

Nebse

Programmer
May 7, 2002
18
DK
I have written a small Sub and named it "Auto_Open" and put it on my template file test.dot ... when I open test.doc (a document made with the test.dot template) Word asks me if I want to open it with og without macros ... when I say yes nothing more happens..... I can manually run the macro and it works.. pleasy help me with this....

Nebse
 
Where have you got this macro? Do you want it to run when the document opens?

dyarwood
 
Rather than writing this code in a module, click under

Microsoft Word Objects

then double click on

This Document

then above the code screen where it says general click on the arrow and select document.

then to the right of that click on the arrow next to new and there is an open option. This will then run the macro whenever the document is opened.

dyarwood
 
The procedure name should be "AutoOpen". Search help file for "autoopen macro" for more details.

combo
 
Thanks for the replies.... I got it to work.... it works when I call it AutoOpen...

Nebse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top