Indexes.MarkEntry (Word)

Inserts an XE (Index Entry) field after the specified range. The method returns a Field object representing the XE field.

Syntax : expression.MarkEntry (Range, Entry, EntryAutoText, CrossReference, CrossReferenceAutoText, BookmarkName, Bold, Italic, Reading)

If Selection.Type = wdSelectionNormal Then 
 ActiveDocument.Indexes.MarkEntry Range:=Selection.Range, _ 
 Entry:="Introduction:" & Selection.Range.Text, Italic:=True 
End If

Arguments

The following argument is required

Range (Range) - The location of the entry. The XE field is inserted after Range.

The following arguments are optional

Entry (String) - The text that appears in the index. To indicate a subentry, include the main entry text and the subentry text, separated by a colon (:) (for example, "Introduction:The Product").

EntryAutoText (String) - The AutoText entry name that includes text for the index, table of figures, or table of contents (Entry is ignored).

CrossReference (String) - A cross-reference that will appear in the index (for example, "See Apples").

CrossReferenceAutoText (String) - The AutoText entry name that contains the text for a cross-reference (CrossReference is ignored).

BookmarkName (String) - The name of the bookmark that marks the range of pages you want to appear in the index. If this argument is omitted, the number of the page containing the XE field appears in the index.

Bold (Boolean) - True to add bold formatting to the entry page numbers in the index.

Italic (Boolean) - True to add italic formatting to the entry page numbers in the index.

Reading (Boolean) - True shows an index entry in the right location when indexes are sorted phonetically (East Asian languages only).