Reading Time: minutes remaining

Word Index Field Switches

Jason Morrell

by Jason Morrell 
July 18, 2022

Once you have built your Word Index using the Mark and Index method or by using a concordance, use the following 14 switches to control what information appears in the index and how it should look.

Press Alt F9 to display all field codes in a document. Or right-click any field entry to toggle a single field code on or off.

You should place the required switches inside the braces of the INDEX field code like this: { INDEX [switches go here] }.

\b Bookmarkname

The \b switch builds an index for a section of bookmarked text. 

To bookmark a section of text, first select the text, then click Insert | Bookmark, type a bookmark name (spaces not allowed) and click OK.

The bookmark name is not enclosed with quotes. 

Example: { INDEX \b Chapter1 } builds an index for the section of text as identified by the bookmark Chapter 1.

\c NumberOfColumns

The \c switch creates an index with the specified number of columns, up to 4.

The number of columns is not enclosed with quotes.

Example: { INDEX \c 2 } creates a two-column index.

\d "SeqPageSeparators"

Used in combination with the \s switch, the \d switch specifies the separator character(s) (up to five) that separate sequence numbers (generated using the SEQ field in the same document or a subdocument) from page numbers.

A hyphen (-) is used if you omit the \d switch.

Do not enclose the sequence number for the \s switch in quotes but DO enclose the separator characters for the \d switch in quotes. 

Example: { INDEX \s Chapter \d " : " } displays page numbers in the format "6:18" where "6" is the SEQ identifier named "Chapter" and "18" is the page number.

Example: { INDEX \s Chapter \d " ---" } displays page numbers in the format "6---18"

\e "EntryPageSeparators"

The \e switch specifies the characters (up to five) that separate an index entry and its page number. The default separator is a comma and space (", ").

Enclose the separator characters in quotes.

Example 1: { INDEX \e " --- " } displays "Marked text entry --- 3" 

Example 2: { INDEX \e } displays "Marked text entry, 3" 

\f "Identifier"

The \f switch creates an index using only the specified identifier.

The default identifier is "I".

Identifiers must be single characters and enclose in quotes.

Example: { INDEX \f "a" } only includes entries marked with XE fields such as { XE "Marked text" \f "a" }, while { INDEX \f "b" } only includes entries with XE fields such as as { XE "Marked text" \f "b" }.

\g "PageRangeSeparators"

The \g switch specifies the characters (up to five) that are placed between the first and last page numbers in a range. The default is a hyphen (-).

Enclose the separator characters in quotes.

Example 1: { INDEX \g " to " } displays "Marked index entry, 3 to 4".

Example 2: { INDEX \g " ... " } displays "Marked index entry, 3 ... 4".

\h "AlphabeticHeader"

The \h switch formats the alphabetic index header (e.g. A, B, C etc.). This text uses the Index Heading style.

Enclose the text in quotes.

Example 1: { INDEX \h "-A-" } displays the appropriate letter before each alphabetic group in the index, resulting in:

-A-
Abacus, 1
Apple, 2

-B-
Banana, 3
Boatie McBoatface, 4

etc.

Example 2: { INDEX \h " " } or { INDEX \h " " } places an empty line between each alphabetic group, resulting in:

Abacus, 1
Apple, 2

Banana, 3
Boatie McBoatface, 4

etc.

\k "CrossRefSeparators"

The \k switch defines the separators (up to five) between cross references and other entries.

Enclose the separator character(s) in quotes.

\l "PageNumSeparators"

The \l switch specifies the characters (up to five) that separate multiple-page references. The default separator is a comma and a space (, )

Enclose the separator character(s) in quotes.

Example 1: { INDEX \l " or " } displays entries such as "Marked text entry, 23 or 45 or 66".

Example 2: { INDEX } displays entries such as "Marked text entry, 23, 45, 66".

\p "SelectedAlphaRange"

The \p switch compiles a partial index for the specified letters.

Use an exclamation mark (!) to include entries that begin with characters other than letters such as #, ~ or *.

Example 1: { INDEX \p a-m } generates an index for only the letters A through M

Example 2: { INDEX \p n-z } generates an index for only the letters N through Z.

Example 3: { INDEX \p !--m } includes any special characters, as well as the letters A through M.

\r

The \r switch runs subentries into the same line as the main entry

Colons (:) separate main entries from subentries.

Semicolons (;) separate subentries from each other.

Example 1: { INDEX \r } displays entries such as
Printing: selected text 2; page range 3; entire document 4.

Example 2: { INDEX } displays
Printing
   selected text 2
   page range 3
   entire document 4.

\s "SEQname"

The \s switch includes the sequence number with the page number.

The default separator character between the sequence number and the page number is a hyphen (-). 

Use the \d switch to specify a different separator character.

The SEQ name must be enclosed in quotes.

\y

The \y switch enables the use of yogi text for index entries

\z

The \z switch defines the language ID that Microsoft Word uses to generate the index

So, how will you use Index switches?

I hope you found plenty of value in this post. I'd love to hear your biggest takeaway in the comments below together with any questions you may have.

Have a fantastic day.

Jason Morrell blog signature
About Jason Morrell

About the author

Jason Morrell


Jason Morrell is a professional trainer, consultant and course creator who lives on the glorious Gold Coast in Queensland, Australia.


He helps people of all levels unleash and leverage the power contained within Microsoft Office by delivering training, troubleshooting services and taking on client projects. He loves to simplify tricky concepts and provide helpful, proven, actionable advice that can be implemented for quick results.


Purely for amusement he sometimes talks about himself in the third person.

SHARE

more from

Office Mastery logo
Read More
Multilevel numbering in Word that works perfectly, first time
Read More
2 Easy Ways to Quickly Navigate a Large Document

JOIN THE DISCUSSION

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
>