I created a macro that will find all months of the year in an email and turn them red. However I only want that to apply to the current email and nothing else within the thread. I'm not sure the syntax I would need to add. Would it be to not check anything below the break line? Or would it have to be a condition based on position?
Can anyone assist?
The following macro needs to add provisions to only apply to the active email I'm writing and no other text below my signature or email break line.
Sub FindAndReplace(findText As String, replaceText As String)
Dim findText As String
Dim replaceText As String
ActiveInspector.WordEditor.Application.Selection.Find.ClearFormatting
ActiveInspector.WordEditor.Application.Selection.Find.Replacement.ClearFormatting
ActiveInspector.WordEditor.Application.Selection.Find.Replacement.Font.Color = wdColorRed
With ActiveInspector.WordEditor.Application.Selection.Find
.Text = findText
.Replacement.Text = replaceText
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
ActiveInspector.WordEditor.Application.Selection.Find.Execute Replace:=wdReplaceAll
End Sub