VBA normal.dot

J

jaslegume

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
 
J

jaslegume

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.
 
S

Shauna Kelly

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
 

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