Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I lock portions of Word docs. while keeping foreign languag | Microsoft Word Help |