Jay,
Thanks for the reply.
> Dim myRange As Range
> Set myRange = ActiveDocument.Range
> With myRange.Find
No, that doesn't work.
The problem is somewhere in the code for searching. When I comment out the
line:
>> .Font.Color = wdColorBlack
Everything works fine. The problem is that I need that line to make the
macro work. See, what I do is go through and turn one set of terms green,
then go through again and turn another set red. However, since there's
overlap between the two sets of terms, I need to exclude the green terms
from the second search.
I really need some help with this one. I've been struggling with it for a
long time, and it seems to be entirely behond my meager powers.
Doug Robbins - Word MVP - 26 Dec 2004 04:45 GMT
Use the following:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TermString
.Font.Color = wdColorAutomatic
.Replacement.Text = TermString
.Replacement.Font.Color = wdColorGreen
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Signature
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> Jay,
>
[quoted text clipped - 19 lines]
> I really need some help with this one. I've been struggling with it for a
> long time, and it seems to be entirely behond my meager powers.