View Single Post
Old 10-02-2019, 12:03 PM
poggyton poggyton is offline Windows 10 Office 2016
Join Date: Oct 2019
Posts: 3
poggyton is on a distinguished road
Thumbs up

Originally Posted by gmaxey View Post
Sub HiLightList()
Application.ScreenUpdating = False
Dim StrFnd As String, Rng As Range, i As Long
StrFnd = "dog,cat,pig,horse,man"
For i = 0 To UBound(Split(StrFnd, ","))
  Set Rng = ActiveDocument.StoryRanges(wdFootnotesStory)
  With Rng.Find
    .Text = Split(StrFnd, ",")(i)
    .Replacement.Highlight = True
    .Replacement.Text = "^&"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = True
    .MatchCase = False
    .MatchWholeWord = True
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = True
    .Execute Replace:=wdReplaceAll
  End With
Set Rng = Nothing
Application.ScreenUpdating = True
End Sub
That's awesome, thank you so much! I really appreciate it
Reply With Quote