Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Stephen Gray
 
Posts: n/a
Default FormattingText, removing characters and keeping character formats.?

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 ;-)

 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I lock portions of Word docs. while keeping foreign languag gtucker4 Microsoft Word Help 1 December 13th 04 01:04 PM


All times are GMT +1. The time now is 01:29 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"