Pinpointing why changes are occuring in Normal template

L

Larry

I open Word, do various things, and then when I close Word, I get prompt
saying that changes have been made to Normal. I don't know what those
changes can be.

Is there a macro that would tell me the moment that a change has taken
place in Normal, so that I could pin point what the change is? I
suppose it's one of my macros might change some setting. But I want to
pinpoint the cause of the change.

Thanks,
Larry
 
J

Jezebel

There isn't a macro that will do it directly, but you could approach it
checking normal's .Saved property: when this changes to FALSE, the template
has been changed. For example, at the end of each of your macros, you could
use --

if not Templates("normal.dot").saved then
msgbox "Normal has been modified."
end if

Bear in mind that there are some actions that wrongly change .Saved -- for
example, querying the CustomDocumentProperties collection. You may need to
use something like --

Dim pSavedSate as boolean

pSavedState = Templates("normal.dot").Saved
:
[ macro code ]
:
Templates("normal.dot").Saved = pSavedState
 

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