running a macro on document open

L

Lucas Karpiuk

hi, i want to automatically change one of the page setup options for every
document that is opened. i've got the code to make the change i want, but
how do i format it to run everytime a document is opened?

thanks
 
C

Charles Kenyon

Put it in an AutoOpen macro in your normal.dot template.

You may want to have it also write a document variable to the document to
show that it has been updated and check for that variable before it runs
through your changes, or not.
--
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

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
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.
 
L

Lucas Karpiuk

Charles Kenyon said:
Put it in an AutoOpen macro in your normal.dot template.

this is what i'm unclear on, so i just create a sub called AutoOpen?

ie.

Sub AutoOpen()
....
End Sub
 

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