Group:  Microsoft Word ยป microsoft.public.word.newusers
Thread: AutoOpen

Geek News

AutoOpen
"christophercbrewster via OfficeKB.com" <u3143[ at ]uwe> 11/20/2008 12:22:07 AM
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.

--
Christopher Brewster
Lockheed Martin, Eagan MN

Message posted via http://www.officekb.com

Re: AutoOpen
Jay Freedman <jay.freedman[ at ]verizon.net> 11/20/2008 2:08:17 AM
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.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net