search and replace all colors except red

J

John Q. Murray

Hi
I am working on a Word 2003 macro to make a series of text replacements
across a wide variety of documents with different styles. I am turning
revision marks on, so I know that text that I have already changed in a
previous search-and-replace operation will become red with single
strikethrough. If the macro has already changed the text, it shouldn't
replace it again -- the macro should operate on all formats *except* red and
single-strikethrough text.

..font.color = NOT wdColorRed

The above isn't the right approach..appears to be doing a bitwise not and
coming up with an invalid color value. Any suggestions?
Thanks
JQ
 
J

John Q. Murray

Apparently I'm asking the wrong question. The revised text isn't formatted
in red with single-strikethrough; it is marked (at least in the RTF) as a
revision.

What I really want to do is direct the Word search and replace macro to
ignore revised text that is scheduled to be deleted.

{\rtlch\fcs1 \af0 \ltrch\fcs0
\deleted\revauthdel1\revdttmdel650484647\insrsid6638735\delrsid14113365 Old
bad stuff}
{\rtlch\fcs1 \af0 \ltrch\fcs0
\cf0\revised\revauth1\revdttm650484647\insrsid14113365 New good stuff}
 
J

John Q. Murray

Seems to behave as I hoped by setting

ActiveDocument.TrackRevisions = True
ActiveDocument.ShowRevisions = False

Thanks for listening...sometimes just the act of trying to explain it to
someone else helps solve the problem. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top