Sub CreateIndex()
Dim StrIdx As String
With ActiveDocument
With .Range
With .Find
.Text = "\(*\)"
.MatchWildcards = True
.Execute
End With
Do While .Find.Found = True
StrIdx = Replace(Replace(.Text, ")", Chr(34)), "(", Chr(34))
.Collapse wdCollapseEnd
.Fields.Add .Duplicate, wdFieldEmpty, "XE " & StrIdx, False
.Find.Execute
Loop
End With
.Indexes.Add Range:=.Range.Characters.Last, HeadingSeparator:=wdHeadingSeparatorNone, _
Type:=wdIndexIndent, RightAlignPageNumbers:=True, NumberOfColumns:=1
End With
End Sub