Hi Nomey,
>Great! I was thinking that switching off Word's Undo buffer might also
>improve the performance. Do you happen to know whether that can be done
>programmatically?
it's always dangerous to say that something cannot be done,
but I don't know of a way. You have to check,
if clearing the undo buffer would speed up the code still more.
Activedocument.UndoClear
But I doubt that.
If very few words have to be marked, it would be of no use.
If very many words have to me marked, one would need
an additional variable, to clear the undo buffer after,
lets say, every 50th marking. But it was just the
elimination of the use of variable, which brought the speed gain.
As speed depends a lot on the structure of the data,
e.g. if 30,000 Word have to be highlighted or only 100,
it's hard to make a suggestion.
Welcome anybody who knows one trick more!
Though I think, there are only some seconds more to gain.
If you can, send me a sample document to both addresses.
HTH

Signature
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
"h.weber" & Chr$(64) & "mi-verlag.de"
Nomey - 30 Jan 2006 18:53 GMT
Hi Helmut,
The second method was blindingly fast: less than a minute to mark a
couple of hundreds of words in a list of 90,000 - without disabling or
clearing the undo buffer.
The list is proprietary, so I'm not allowed to 'divulge' it, but this is
the structure:
magnetization, mag·ne·ti·za·ti·on, [noun]
magnetize, mag·ne·ti·ze, [verb], mag·ne·ti·zed
etcetera, etcetera, etcetera.
Thanks again,
Shirley Nomey