Use With ... End With to eliminate unnecessary object references.
Use Range object instead of the Selection object.
Disable Office plug-in for norton auntie virus, if you have nav, but keep
nav's autoprotect enabled.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
Howard,
Thanks for your suggestions. I don't have Norton installed and
I turn off my antivirus when testing the macros.
All my macros run fine in Word 97 and Word 2000 but all of them take
twice as long to process in Word 2003 (using XP on a faster machine).
If the cause of this slowdown is related to how Microsoft is
processing the VBA commands, I would have thought that Microsoft would
have mentioned the change.
Has Microsoft slowed down the processing of Selection objects in Word
2003 as opposed to how fast it handles them in 97 and 2000?
Bill
> Use With ... End With to eliminate unnecessary object references.
> Use Range object instead of the Selection object.
> Disable Office plug-in for norton auntie virus, if you have nav, but keep
> nav's autoprotect enabled.
> --
JB - 04 Nov 2004 17:46 GMT
> Howard,
>
[quoted text clipped - 17 lines]
>>nav's autoprotect enabled.
>>--
Hi Bill,
The selection object is vastly slower that the range object as I've
found lately. I re-coded something using ranges and it was 10 seconds
faster than the old code using selections (damd big document of course).
Have a look at this article about ranges
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/de
ovrTheRangeObject.asp
and this should get you started.
I've noted also that Word XP & 2003 are slower than 2000 (possibly due
to translation of VBA into .NET) but that's just my experience. Also
try not to test over network shares and keep all macros for your users
on the C: drive (possibly with a logon script if you have that choice,
making updates much easier also).
HTH
J
Howard Kaikow - 05 Nov 2004 09:16 GMT
> I've noted also that Word XP & 2003 are slower than 2000 (possibly due
> to translation of VBA into .NET) but that's just my experience. Also
> try not to test over network shares and keep all macros for your users
> on the C: drive (possibly with a logon script if you have that choice,
> making updates much easier also).
There is no .NET code, it is still VBA.
Howard Kaikow - 05 Nov 2004 09:14 GMT
Word 97 handles documents quite differently than later versions, so there
can be significant performance hits, depending on how you did the code.
Word 2000 handles things differently than Word 2003, I just ran cross an
example a few weeks ago, don't recall where.
These changes particularly affect the Selection object. Less impact if you
use the Range object.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
> Howard,
>
[quoted text clipped - 17 lines]
> > nav's autoprotect enabled.
> > --
Bill_McC - 05 Nov 2004 15:59 GMT
One of my macros consistently takes 1 min 8 sec on Word 2000 and and
8 min 15 sec on Word 2003 which is just too slow for users. All my other
macros which use a variety of VBA code also take longer.
I haven't been able to find anything from Microsoft warning of a
possible slowdown in Macros in Word 2003 because of changes
in how it handles VBA code so I'm unsure of how I would need to
rewrite them.
Thanks for your help.
Bill
> Word 97 handles documents quite differently than later versions, so there
> can be significant performance hits, depending on how you did the code.
[quoted text clipped - 28 lines]
> > > nav's autoprotect enabled.
> > > --
Howard Kaikow - 05 Nov 2004 17:18 GMT
Use the range object as a first step.
Use With ... End With to reduce object references.
There is no general answer, the full code would need to be examined.
I have a client for which I reduced execution time by 99.2%, and there was
still room for improvement, but it took a lot of code rewrite to get there.
Also, if you have norton auntie virus, disable the nav office plug-in, but
keep nav's autoprotect enabled.
Your code is likely doing something that is less efficient than it could be
and got caught by some change in Word 2003.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
>
> One of my macros consistently takes 1 min 8 sec on Word 2000 and and
[quoted text clipped - 42 lines]
> > > > nav's autoprotect enabled.
> > > > --
Bill_McC - 05 Nov 2004 19:32 GMT
Ok. Thanks for your help.
Bill
> Use the range object as a first step.
> Use With ... End With to reduce object references.
[quoted text clipped - 56 lines]
> > > > > nav's autoprotect enabled.
> > > > > --