By changing:
.MatchAllWordForms = True
to:
.MatchAllWordForms = False
the code already works for any punctuation except a comma. If you need to work with commas as well, use:
Code:
Sub HiLightList()
Application.ScreenUpdating = False
Dim StrFnd As String, h As Long, i As Long
h = Options.DefaultHighlightColorIndex
Options.DefaultHighlightColorIndex = wdYellow
StrFnd = "dog|cat|pig|horse|man"
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Replacement.Highlight = True
.Forward = True
.Wrap = wdFindContinue
.Format = True
.Font.Underline = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Replacement.Text = "^&"
For i = 0 To UBound(Split(StrFnd, "|"))
.Text = Split(StrFnd, "|")(i)
.Execute Replace:=wdReplaceAll
Next
End With
Options.DefaultHighlightColorIndex = h
Application.ScreenUpdating = True
End Sub