Hello. I have a word template that has a macro in it. The macro reads some
data in from an Outlook com addin. Right now I am just popping a message box
to test it. When I open the template and a new document (test1.doc) opens,
the macro is not available in it. I want this macro to run automatically so
selecting it from the macros dialog is not an option. Is there a way to
force the macros in a template to go with the new documents that get created
from this template?
Thanks, Mark
Markw911 was telling us:
Markw911 nous racontait que :
> Hello. I have a word template that has a macro in it. The macro
> reads some data in from an Outlook com addin. Right now I am just
[quoted text clipped - 5 lines]
> template?
> Thanks, Mark
See the Document event in the ThisDocument module of your template.
Display the ThisDocument code pane, list the content of the dropdown list at
the top of the code window on the left, choose Document. Finally, choose an
event in the dropdown on the right.
Put your code inside the event sub that gets inserted when you select an
event. You want Document_New

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org