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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jaslegume - 27 Jul 2007 20:18 GMT
Is there a way to intercept the save action through VBA and normal.dot.  This
would be a generic save whether it comes through the file/save action of the
menu or whether it comes from the "do you want to save this document"
dialogue box
Shauna Kelly - 28 Jul 2007 07:31 GMT
Hi jaslegume

See
Intercepting events like Save and Print
http://www.word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm

Hope this helps.

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

> Is there a way to intercept the save action through VBA and normal.dot.
> This
> would be a generic save whether it comes through the file/save action of
> the
> menu or whether it comes from the "do you want to save this document"
> dialogue box
jaslegume - 30 Jul 2007 13:06 GMT
Shauna:

This information was very useful.  I wonder, do you have an example of a
procedure that could run in the document close event that would do the
following.  1) Check to see if there was a dirty buffer (file needs saving)
and 2) if the file was actually saved.

What I am trying to do is create an audit of document templates getting
saved.  We have thousands of templates here where I work and sometimes the
templates or documents get modified even when they are protected.  I have
created an audit database and I am logging events that happen to the
templates.

Any help would be much appreciated.

> Hi jaslegume
>
[quoted text clipped - 13 lines]
> > menu or whether it comes from the "do you want to save this document"
> > dialogue box
Shauna Kelly - 31 Jul 2007 08:20 GMT
Hi

If you don't want templates to be changed by users, then I would suggest you
mark them as read-only in Windows for all users except people who need to
edit the templates. Then the operating system is controlling access to the
files, and you're not relying on Word.

You can see if a document (or template) is dirty by querying the
Document.Saved property. If it is False, then Word thinks the document (or
template) is dirty.  If you set the .Saved property to True, and the user
tries to close the document, Word will not prompt the user to save the file.

Hope this helps.

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

> Shauna:
>
[quoted text clipped - 30 lines]
>> > menu or whether it comes from the "do you want to save this document"
>> > dialogue box

Rate this thread:






 
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.