Re: Set Word Options in VBA for Word 2007



Although users do not run this macro daily, however, it is very handy when
they get very creative and start to try to set the options that will either
cause some problems or conflict with firm's standard (like use straight quote
or smart quote, etc.). In reality, this macro is being run more often than I
wish. It is a concern because it takes 7 minutes and my own experience is
that I'll terminate the process when it takes that long. However, I've
figured out the problem due to the prompt of "conneting to printer"; somehow
Word will try to connect to printer in many of the settings, I happened to
set the default printer on my Vista PC to a shared printer on a Windows xp on
network, the connection is slooooooow. When I reset the printer to a local
one (I do not really have one, so I set it to "fax"), then the macro finishes
in a minute. Although it is still not as fast as in 2000/2003, at least it
is acceptable now. I still don't understand the needs to connect to printer
for most of these settings, such as MeasurementUnit, ...etc. It will be
great if any one can tell me how to turn that off ...

"Doug Robbins - Word MVP" wrote:

If it is only something that is done occasionally for the purpose that you
mention, why worry about the performance.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Cora" <Cora@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0DF33670-9F6D-46A3-AA16-5DACF7520400@xxxxxxxxxxxxxxxx
The macro does more than just the settings stored in the "Data" key.
Besides, the "Data" key might store something I do not want to "reset".
This
macro is meant for the end users to "reset" the Word settings to certain
standard of the firm whenever they feel need it. Although it will not be
hard to write a macro to restore the "Data" key to certain value, I have
not
found the documentation of what information stored in "Data" key and in
what
way, it is binary. I do know that it gets corrupted some time. Do you
know
where I can find the documentation? And maybe I can modify the registry
instead of Word Object to speed up the process.

Thanks again.

"Graham Mayor" wrote:

Why should this macro be necessary? Word 2003 had a few issues with the
registry entries being randomly changed (probably as a result of the data
key being adversely affected by errant add-ins), but I don't recall
seeing
any reports of this occurring with other Word versions. Wouldn't you be
better simply backing up the Word data key from the registry, and forget
your macro?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Cora wrote:
I've created a macro to set Word Options to my needs in Word 2007. It
includes most of the properties settings for Options object and some
properties settings for Application & Window/View object. It runs
VERY SLOW. I stepped through each line of codes and found half of the
settings take several seconds to finish. The similar macro I created
for Word 97/2000/2002/2003 run very smoothly, took just a second to
finish all. I've noticed the message "conneting to printer .." shown
on the status bar when the macro run and tried to turn off
"Application.ScreenUpdating", no difference. Does any one know how
to fix this problem?

Thanks in advance.






.