View Single Post
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

Try inserting an UndoClear to speed things up. And possibly a wildcard
replace to delete the unwanted characters

See the article "Finding and replacing characters using wildcards" at:

http://word.mvps.org/FAQs/General/UsingWildcards.htm


--
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
"Stephen Gray" wrote in message
ups.com...
Unfortunately I have to a search and replace ( just removing characters
e.g. carriage returns etc .. ) on a table row by row .. sadly it's a
long story why. The document itself contains one table per page and
for some reason if you do a Row.Range.Find ( or even selection.Find )
the process get's slower and slower!

I then had a look at using RegExp to perform the search and replace and
tried it on formattedText ( and Selection.Text and Range.Text as a test
) and it was very fast but unfortunately it removes the formatting and
seems to take the formatting of the first character item, i.e. I have
5 characters in my text 'hello', all of which are formatted differently
h is is red, e is bold green etc ... if I remove 'ell' 'o' will take
the format of 'h'. Is there any easy way to do this as at the moment I
am going through FormattedText.Characters in code and removing the
characters one at a time ( using for each ), which is still a lot
faster and works but it seems a bit on the Cowboy side ;-)


Is there any way to remove characters in a table row, keep the
formatting for all characters that are left and not have to use the
built in .Find .. search and replace functionality? ( as a side not
anyone ever experienced it getting slower and slower ?)

Thanks for any help you can give as I'm starting to loose it ;-)