Placing More Than One Index in a Document

Occasionally, you might want to include more than one index in your document. For example, you might want a separate index for all quotes in your document. Using the method that follows, Word enables you to create as many different indexes in the same document as you need.

First, mark your index entries. Then, create a bookmark that covers all the text you want to incorporate in one of your indexes. To do this, select the area of your document for which you want to create a separate index and choose Insert, Bookmark. Then enter a name for the bookmark. (In this example, we use Index2, although you can use any name you want.) Click Add.

Now, position your insertion point where you want to create your index, and follow these steps:

  1. Choose Insert, Field.

  2. Select Index from the Field Names scroll box.

  3. Click Field Codes.

  4. Click Options.

  5. Select \b from the Switches scroll box, and click Add to Field.

  6. In the field description, after INDEX \b, add the following text: Index2. The line of text should appear as follows:

    INDEX \b Index2

    This field tells Word to create an index covering only the block of text corresponding to the bookmark named Index2.

  7. Click OK twice.

  8. Press Ctrl+A (or choose Edit, Select All) to select the entire document.

  9. Press F9 to update all the fields, including the { INDEX } field you just entered.


In this example and some examples that follow, other switches you might need have been excluded for simplicity. The best way to edit the { INDEX } field code is to first use the Index tab of the Index and Tables dialog box to create as many settings as possible and then display the field code to add the settings you can't make elsewhere.

Indexing Only Selected Entries

As mentioned earlier, you might want to create multiple indexes, one containing only certain entries, such as quotes, that are not contained in the other indexes within the same document. Doing so is a two-step process.

You first manually insert { XE } fields for the entries you want to include in a specific index. Each of these { XE } fields must include the \f switch, as well as an initial (other than "i") that corresponds to the index you will create later.


Including the initial "i" tells Word to include the field in its default index.

For example, you might decide to use the initial "q" for each index entry that will be compiled into an index of quotes, and then create fields that read like this:

{ XE "To be or not to be"  \f "q"  }

After you've set up all the index entries you want to include in this custom index, you can insert the index itself, using a manual { INDEX } field that contains the same switch. For example:

{ INDEX \f "q"  }


Your { INDEX } field may also contain other switches specifying formatting, language, and other elements.

The easiest way to create this field is to work through the Insert, Reference, Index and Tables dialog box as you normally would. After you've inserted your index, right-click on it, choose Toggle Field Codes, and add the \f switch and letter manually.

Indexing Only Selected Letters of the Alphabet

If your index is especially large, you may want to split it into two or more indexes to improve Word's performance. You might, for example, create one index that covers letters A through M and another for N through Z.


Even if Word is performing perfectly well, you might occasionally want to compile an index based on only part of the alphabet for review purposes. Large indexes require careful review; you might ask one reviewer to handle letters A through M and another reviewer to handle N through Z.

To create an index covering only some letters of the alphabet, follow these steps:

  1. Create all your index entries as you normally do.

  2. Insert the index into your document the way you normally do.

  3. Right-click anywhere in the index and choose Toggle Field Codes to display the field code rather than the field result.

  4. Add the following to your { INDEX } field code:

    \p n--z

Notice the double hyphens. In this example, you've told Word to compile the index from N to Z.

Compiling an Index with Only the Entries You Select

Word indexes typically contain all the index entries you selected. However, you can create custom indexes that contain only the items you specify. For example, you might be forwarding a large document to a reviewer with expertise about one specific topic. If you create a custom index, you can call attention to the pages that contain information you want reviewed. That saves the reviewer time. It might also discourage the reviewer from slowing you down with gratuitous comments about other areas of the document!

Assuming that you've already indexed the document, click Show/Hide Paragraph Marks to display hidden text, including the contents of your { XE } index entry fields. Now, in each entry you want to appear in your specialized index, add the \f switch, a space, and any letter of the alphabet except I. (You can also use numerals and any symbol characters that appear in the ANSI character set. However, in most situations, the 25 characters and the numbers 0 through 9 should provide you more than enough custom indexes without your resorting to ANSI codes.) You cannot use I because Word interprets it as a direction to include an entry in the default index. Use the same letter for every entry you want to compile as a group. So, for example, you might have an index entry that reads

{ XE "MP3 and Copyright Law"  \f r }


Does marking entries for a special index sound like a lot of work? Here's how to streamline it. With all the field codes visible, use Word's Edit, Replace dialog box to add the \f r switch to all identical fields at once.

In the preceding example, you might include

XE "MP3 and Copyright Law"

in the Find What box and add the following in the Replace With box:

XE "MP3 and Copyright Law" \f r

Then click Replace All, and Word fixes all instances at the same time. You can use this technique any time you need to make a global change in many fields at the same time.

After you finish customizing your index entries, create and insert your index the way you normally do. Click anywhere inside the index and press Shift+F9 to view the { INDEX } field code. Click inside the field code and add the same switch at the end. For example:

{ INDEX \f r }

Then update the index by any means you choose (such as right-clicking the field and choosing Update Field). This inserts the updated custom index and returns to the view of the index rather than the { INDEX } field code.


If you need an index entry to appear in both the default index and a custom index, create two separate XE index entries: one that includes the custom index instruction (for example, { XE \f "r" }), and one adjacent to it that does not.

Using { INDEX } Field Codes to Control Other Index Formatting

You've already seen how manually editing an { INDEX } field code can enable you to create partial indexes based on letters of the alphabet or specific index entries. Occasionally, you may have to use other { INDEX } field switches to generate index formatting you can't get any other way.

Creating Separator Characters

The \d switch sets the separator character that Word places between chapter numbers and page numbers in index entries. By default, Word uses a hyphen, as in the following example:

Hedge funds, 3-8, 5-6

However, it's not uncommon to use colons or other characters:

Derivatives, 4:6, 9:12

You can separate chapter numbers from page numbers with any character. You can even use several characters (up to five). Within your { INDEX } field, add the \d switch and a space.

Then add quotation marks containing the characters you want to use, as in the following example, which replaces the hyphen with a colon:

{ INDEX \d ":"  }

Creating chapter numbers in Word is not straightforward; see "Adding Chapter Numbers to Your Captions," p. 700.

Creating Separator Characters for Page Ranges

Just as you can create separator characters that go between chapter numbers and page numbers, you can also create separator characters that go between the numbers in ranges of pages. By default, Word uses an en dash, as in the following example:

Wireless Internet services, 62?68, 104?113

Use the \g switch to change the separator. The syntax is exactly the same as for the \d switch. For example, to use a colon as a separator, enter the following:

{ INDEX \g ":"  }
Controlling the Appearance of Alphabetical Headings

Earlier, you saw that Word can insert headings before the index listings associated with each letter of the alphabet using special index formats in the Index tab of the Index and Tables dialog box. You can use the \h switch in the { INDEX } field to control the appearance of these headings. You're most likely to use this switch in two ways: to insert a blank line rather than a heading between letters, or to lowercase the letters in your headings for design reasons.

To insert a blank line, edit your existing { INDEX } field code to include the following:

\h " "

Be sure to include the space between the quotation marks. Even though Word's Help file says this isn't needed, Word will not insert a blank line without the space.

To lowercase your headings, edit the \h switch in your existing { INDEX } field code to include the following:


For example, if your current field code reads

{ INDEX \h "A"  \c "2"  }

you would then edit it to read

{ INDEX \h "A"  \*lower \c "2"  }

You can also use the \h switch to custom design your own heading styles with special symbols or characters before or after the letter in the heading. To do this, enter the characters you want along with the letter A between quotes after the \h switch, like this:

{ INDEX \h "***A***"  \c "2"  }

This inserts three asterisks before and after each heading letter. In place of asterisks, you can use any symbol character in a normal text font except for letters of the alphabet. This feature will not properly generate characters from fonts such as Symbol or Wingdings, however.

    Part I: Word Basics: Get Productive Fast
    Part II: Building Slicker Documents Faster
    Part III: The Visual Word: Making Documents Look Great
    Part IV: Industrial-Strength Document Production Techniques
    Part VI: The Corporate Word