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
--
John Q. Murray
Executive Director
Corporation for Public Community Newspapers

RE: search and replace all colors except red by johnqmurray

johnqmurray
Mon May 19 15:07:02 PDT 2008


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}
--
John Q. Murray
Executive Director
Corporation for Public Community Newspapers


"John Q. Murray" wrote:

> 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
> --
> John Q. Murray
> Executive Director
> Corporation for Public Community Newspapers

RE: search and replace all colors except red by johnqmurray

johnqmurray
Mon May 19 15:20:01 PDT 2008

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. :-)
--
John Q. Murray
Executive Director
Corporation for Public Community Newspapers


"John Q. Murray" wrote:

> 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}
> --
> John Q. Murray
> Executive Director
> Corporation for Public Community Newspapers
>
>
> "John Q. Murray" wrote:
>
> > 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
> > --
> > John Q. Murray
> > Executive Director
> > Corporation for Public Community Newspapers