Disable Saving Normal.dot

K

keith H

Hello,
The scenario: automating WORD from MS Access. Creating and saving multiple
new documents from the code. I have turned off 'Prompt to save Normal...' in
Options. I am still getting the prompts when the code runs for each new
document instance. The code intentionally closes and sets to Nothing each
document before creating the next one. How can I get rid of that prompt?

Thanks in advance!

Keith H
 
J

Jezebel

Something in your code is making changes to normal.dot (it doesn't change by
itself) -- find it and fix it.
 
K

keith H

I couldn't find any differences in Normal.dot; there was no text and the
named styles were still the same, although I didn't check all the details for
all the styles. And the code was using a different template anyway. I don't
know why Normal was even running.

In any case, I rewrote the code into a single large module so I could keep a
single instance of Word running for all of it. Then even with Quit and set to
Nothing, I still had to kill an instance in the task manager to get rid of
it...

But at least it runs all the way through now without errors -

keith H
 
J

Jezebel

Normal.dot is ALWAYS running. If you're getting the prompt, then SOMETHING
is changing. There are some quite obscure events that will change the
template's .Saved state, including merely querying the
CustomDocumentProperties. If you want to track it down, at the start of the
your code get a reference to normal.dot, then as your code runs monitor its
..Saved value: when that changes from TRUE to FALSE, you've found the
problem.
 
C

Charles Kenyon

The message "Changes have been made that affect the global template -
normal. Do you wish to save those changes?" is an important warning. It
suppplements your virus detector and handles other potential problems. Its
display means that changes have been made, whether you intended to make
changes or not. You can also get it when your template has been altered by a
poorly written Add-In program or by a virus.

The reason for the message being shown repeatedly is almost always a poorly
written Add-In. The Norton AV Office Plug-In seems to be the most frequent
offender recently, but that can change as some other poorly written program
comes on the market.

Other offenders include the MS Works Suite Add-In, EZ-Photo, Scansoft, and
Adobe Acrobat. These all install Add-Ins that mess with your normal.dot when
they shouldn't do so and don't need to do so. Some of these are .dot files,
others are installed. See <URL:
http://word.mvps.org/FAQs/Customization/CheckIfAddinsInstalled.htm> for
instructions on seeing what Add-Ins you have. (Having Add-Ins is not a bad
thing. I run Word with 15 Add-Ins, most of which I wrote myself.)

Start with the Add-Ins I've noted. If you have any of them, decide whether
they are worth the annoyance they are causing you. Probably they are not.
Disable any that are not worth the candle. Restart Word and see if your
problem is gone.

If not...

If you start Word using
Start => Run: Winword.exe /a
you'll end up with Word out of the box loading without your saved normal.dot
file, with no macros and no Add-Ins. You may notice that it loads much more
quickly than you are used to seing. When you close it, you won't get the
"normal.dot" prompt. Doing this may fix the problem, by itself, but probably
will not. Generally, it is a diagnostic, not a fix.

So, what you need to do is disable all of your Add-Ins (don't delete them).
Start by moving .dot files out of your Word Startup folder, one-by-one, with
Word closed. Restart Word and see if that Add-In caused the problem. If not,
put it back in and take the next one out. (You can put them in a sub-folder
of your Startup folder.) If none of them are the problem, move to the .com
Add-Ins that have to be uninstalled.

If your offender is not on my list, please write back and let us know which
one caused your problems.

Write to the company that put out the Add-In with a complaint, and possibly
a bill for your time.

Hope this helps,
 
T

Tabasco Ed

When you turn off the prompt to save Normal.dot, it saves Normal.dot
automatically. Can this behaviour be changed so that turning off the
prompt results in not saving Normal.dot, as though you answered "No"
when it prompted you?
 
C

Charles Kenyon

No, but you can make normal.dot read only. I wouldn't recommend turning off
the prompt or locking normal.dot, but you can do both. (If you do both,
though, I expect you'll get an error message telling you that the file is
read-only and/or a SaveAs dialog box.)
 
Top