I have a unique case where I want to move the selection forward in a document to the first of either the next highlighted word or the next word with turquoise font color. I know both actions are individually possible with:
Code:
Selection.Find.ClearFormatting
Selection.Find.Highlight = True
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindAsk
.Format = True
.MatchCase = False
End With
Selection.Find.Execute
Code:
Selection.Find.ClearFormatting
Selection.Find.Font.ColorIndex = wdTurquoise
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
But how do I make Word search for both at the same time and jump to the next instance of whichever one comes first?
Thank you!!