Add Method (Indexes Collection) Example
This example marks an index entry, and then it creates an index at the end of the active document.
ActiveDocument.Indexes.MarkEntry _
Range:=Selection.Range, Entry:="My Entry"
Set MyRange = ActiveDocument.Content
MyRange.Collapse Direction:=wdCollapseEnd
ActiveDocument.Indexes.Add Range:=MyRange, Type:=wdIndexRunin