Field codes: XE (Index Entry) field

The XE (Index Entry) field defines the text and page number for an index entry (index entry: A field code that marks specific text for inclusion in an index. When you mark text as an index entry, Microsoft Word inserts an XE (Index Entry) field formatted as hidden text.). You insert an XE field to define an item to include in the index (index: A list of the words and phrases that are discussed in a printed document, along with the page numbers they appear on.).

The XE field is formatted as hidden text (hidden text: Character formatting that allows you to show or hide specified text. Microsoft Word indicates hidden text by underlining it with a dotted line.) and displays no result in the document. To view this field, click Show/Hide Paragraph mark Button image.

Security  Because content that is formatted as hidden text can easily be made visible, do not use hidden text formatting to keep sensitive information private.


When you view the XE field in your document, the syntax looks like this:

{ XE "Text" [Switches ] }

 Note    A field code tells the field what to show. Field results are what’s shown in the document after having evaluated the field code. To toggle between viewing the field code and the field code results, press Alt+F9.



Text you want to appear in the index. To indicate a subentry (subentry: An index entry that falls under a more general heading. For example, the index entry "planets" could have the subentries "Mars" and "Venus."), include the main entry text and the subentry text, separated by a colon (:).



Applies bold formatting to the entry's page number. The field { XE "Highlighting text" \b } displays the entry as "Highlighting text, 23" in the index. The switch removes bold formatting if the index style (style: A combination of formatting characteristics, such as font, font size, and indentation, that you name and store as a set. When you apply a style, all of the formatting instructions in that style are applied at one time.) for the entry is bold.

\f "Type"

Defines an entry type. The entry for the field { XE "Selecting Text" \f "a" } is included only in an index inserted by the field { INDEX \f "a" }. The default entry type is "i."


Makes the entry's page number italic. The field { XE "Finding text" \i } displays the entry as "Finding text, 23 " in the index. The switch removes the italic formatting if the index style for the entry is italic.

\r Bookmark

Inserts as the entry's page number the range of pages marked by the specified bookmark (bookmark: A location or selection of text in a file that you name for reference purposes. Bookmarks identify a location within your file that you can later refer or link to.). The field { XE "Selecting text" \r SelectingText } displays the entry as "Selecting text, 20–25" in the index.

\t "Text"

Inserts the text in place of a page number. Enclose the text in quotation marks. The field { XE "Highlighting" \t "See Selecting" } displays the entry "Highlighting, See Selecting" in the index.


Specifies that the subsequent text defines the yomi (first phonetic character for sorting indexes) for the index entry.

 Note   This switch can be used if you have at least one East Asian language enabled.

Applies to:
Word 2013, Word 2010, Word 2007, Word 2003