Automatically Starting mMacros

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm creating a new template for word i.e. A *.dot file. Basically once its
finished it will automatically perform a mail merge. However, I cannot find
any information on whether or not I can get a macro to run automatically when
a word document is opened based on my new template.

Is there an option I can set? or a piece of code I can borrow?
 
you can set the *.dot file into the "startup" folder.

for off2k and offXP: Microsoft Office/office10/statup

winword does run these *.dots when you open it!
hope this helps
 
Ben said:
I'm creating a new template for word i.e. A *.dot file. Basically
once its finished it will automatically perform a mail merge.
However, I cannot find any information on whether or not I can get a
macro to run automatically when a word document is opened based on my
new template.

Is there an option I can set? or a piece of code I can borrow?

Hi Ben,

The trick is in the name you give to your macro and where you store it. Name
the macro Document_Open or AutoOpen and store it in your template. See
http://word.mvps.org/FAQs/MacrosVBA/DocumentEvents.htm for a description.
 
Back
Top