Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

VBA normal.dot autoopen

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jaslegume - 27 Jul 2007 20:22 GMT
How do I get a reference to all of the special sub routine names in
normal.dot that intercept certain events.  A good example is "autoopen".  
When you call a sub autoopen it will intercept all open events no matter
where the open takes place.  For instance it will fire if you go file/open
and it will fire if you open it from the file explorer tool.
Shauna Kelly - 28 Jul 2007 07:30 GMT
Hi jaslegume

See
Running a macro automatically when a document is created, opened or closed
http://word.mvps.org/FAQs/MacrosVBA/DocumentEvents.htm

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> How do I get a reference to all of the special sub routine names in
> normal.dot that intercept certain events.  A good example is "autoopen".
> When you call a sub autoopen it will intercept all open events no matter
> where the open takes place.  For instance it will fire if you go file/open
> and it will fire if you open it from the file explorer tool.
jaslegume - 30 Jul 2007 16:42 GMT
Shauna:

What I am trying to do is to provide code to the normal.dot file so that I
can track the saving of protected templates.  This means I need to capture
both the close event and the save event.  This should be done globally.  
Within the close even I need to track the diaglogue that comes up and ask you
if you want to save the file.  On the save event i want to track whether the
file has been changed.

> Hi jaslegume
>
[quoted text clipped - 12 lines]
> > where the open takes place.  For instance it will fire if you go file/open
> > and it will fire if you open it from the file explorer tool.
Shauna Kelly - 31 Jul 2007 08:21 GMT
Hi

It's generally considered poor practice to edit users' normal.dot files. The
better solution is to put your code in a .dot file, and put that .dot file
into the Word startup folder. It will then load as an add-in whenever Word
starts.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> Shauna:
>
[quoted text clipped - 27 lines]
>> > file/open
>> > and it will fire if you open it from the file explorer tool.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.