There are special macro names that are used to respond to document
events in Word. The article at
http://www.word.mvps.org/faqs/macrosvba/DocumentEvents.htm explains
what they are.
Essentially, if you name a macro AutoOpen(), and you store it in a
module in the Normal.dot template, that macro will run whenever any
document opens. Inside the macro, the code can check the name of the
document, or the name of its attached template, or anything else that
would let it identify the document. If it isn't the right document,
the macro just does an Exit Sub and nothing happens. When it is the
right document, the macro continues whatever processing is needed.
There's also the special name Document_Open(), which is similar but
goes into the ThisDocument module of the specific template on which
the document is based, instead of Normal.dot.
Finally, there's the application event handler oApp_DocumentOpen().
This is a lot harder than the others to set up properly; see
http://www.word.mvps.org/faqs/macrosvba/PseudoAutoMacros.htm and
http://www.word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm for help.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.