On Thu, 20 Nov 2008 00:22:07 GMT, "christophercbrewster via OfficeKB.com" <u3143[ at ]uwe> wrote:
[Quoted Text] >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.
-- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
|