Got it to work:
Selection.Find.ClearFormatting
With Selection.Find
.Text = "Index:"
.Forward = True
.Wrap = wdFindStop
End With
While Selection.Find.Execute
Selection.MoveRight Unit:=wdCell
Selection.EndKey Unit:=wdLine, Extend:=wdExtend
If Len(Selection.Text) > 1 Then
ActiveDocument.Indexes.MarkEntry Range:=Selection.Range, _
EntryAutoText:=SelectedText, CrossReference:="", CrossReferenceAutoText:="", _
BookmarkName:="", Bold:=False, Italic:=False
End If
Wend
|