AutoOpen

  • Thread starter christophercbrewster via OfficeKB.com
  • Start date
C

christophercbrewster via OfficeKB.com

A template that I'm preparing to distribute was running AutoOpen correctly
when I would open a document based on it. But when I move it to Startup,
reboot, etc., so that it's an Addin, AutoOpen doesn't run. Does the routine
need a different name when it's in an Addin, or is there another way to make
it run automatically? It needs to run in order to load a toolbar.
 
J

Jay Freedman

A template that I'm preparing to distribute was running AutoOpen correctly
when I would open a document based on it. But when I move it to Startup,
reboot, etc., so that it's an Addin, AutoOpen doesn't run. Does the routine
need a different name when it's in an Addin, or is there another way to make
it run automatically? It needs to run in order to load a toolbar.

Name it AutoExec (see
http://word.mvps.org/FAQs/MacrosVBA/ApplicationEvents.htm).

Beware: an AutoExec macro in an add-in runs before there is any document, so any
statement that refers to or assumes the presence of a document will throw an
error. Loading a toolbar should be ok.
 

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