Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oCol As New Collection
Dim lngIndex As Long
Selection.Find.ClearFormatting
Selection.Find.Highlight = True
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
While .Execute
Selection.Range.HighlightColorIndex = wdAuto
oCol.Add Selection.Range.Text
Selection.Collapse wdCollapseEnd
Wend
End With
For lngIndex = 1 To oCol.Count
Debug.Print oCol.Item(lngIndex)
Next lngIndex
lbl_Exit:
Exit Sub
End Sub