Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Multiple Indexes in a Document.

Multiple Indexes in a Document

Written by Allen Wyatt (last updated December 23, 2023)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


4

Marc has a multi-sectioned document. He wants to create an index on one section and a second index for the entire document. Marc wonders if there is a way to have two indexes in a document where one of them covers only a single section.

The short answer is yes, there is a way. When you insert an index into a document, what you are actually doing is inserting the INDEX field. With no switches used in the field, Word creates an index based on the entire document. To create an index based on only a portion of the document (such as on a single section), follow these general steps:

  1. Select the document section that you want to have indexed in its own special index.
  2. Create a bookmark that applies to the selected text. (Click the Bookmark tool on the Insert tab of the ribbon.) Remember the name you used for the bookmark.
  3. Create the basic INDEX field. (Press Ctrl+F9 to insert field braces and type the word INDEX.)
  4. After the word INDEX, type a space, \b (to indicate that this index will apply to only a bookmarked area of the text), another space, and the name of the bookmark you created in step 2. Your entire field should look something like this:
  5. { INDEX \b MySection }
    
  6. Press F9 to collapse the field and create your index.

There is another way to approach the problem, as well: You could add a switch to the XE field that is used to create an index entry. For instance, let's say you are indexing the term "polar bear" for the index. Make sure you have a field near the term like this one:

{ XE "polar bear" \f "a" }

The \f switch should appear only for index entries in the section that you want to have its own index. Later, when you insert the INDEX field to create the index for that section, you should make sure it looks like this:

{ INDEX \f "a" }

The index created by this field will only include those index entries that use the \f switch followed by the letter "a".

This addition of a switch to the XE field is handy, and it opens up another potential use. Say that you want two indexes for the entire document, perhaps one for places and one for people. All you need to do is follow these general steps:

  1. Insert index entries for all of the places you want indexed. Make sure that these index entries all include the \f switch followed by the letter "a".
  2. Insert index entries for all of the people you want indexed. Make sure that these index entries all include the \f switch followed by some other letter, such as "b".
  3. At the point you want your index for places, insert an INDEX field and include the \f switch followed by the letter "a".
  4. At the point where you want your index for people, insert an INDEX field and include the \f switch followed by the letter "b".
  5. Update all the fields in your document. (Press Ctrl+A and then press F9.)

This should provide you with the two indexes you want. The key is that you are using the /f switch in the XE field to indicate which index (specified by the INDEX field with the same /f switch) should include that entry.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (12137) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Multiple Indexes in a Document.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Continuous Formatting for Footnotes

If you've got a lot of short footnotes in a document, you might be looking for a way to save space by "crunching up" the ...

Discover More

Positioning the Footnote Separator

The Footnote Separator, as its name implies, separates the footnotes on each page from the text on that page. If the ...

Discover More

Capitalizing the First Letter after a Colon

There are many rules in English grammar (and many exceptions to those rules.) One common rule of grammar is to capitalize ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (ribbon)

Deleting Index Entries

When you construct an index you need to insert all sorts of index fields throughout your document. If you want to later ...

Discover More

Creating a Single Index from Multiple Documents

When dealing with large projects, it is not uncommon to break the project into multiple documents. When it comes time to ...

Discover More

Including Section Numbers in an Index

When you use Word to create your index, you'll normally only include a page number in the index. If you want to create an ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one less than 9?

2024-01-16 16:02:31

Paul

The last line of the article uses forward slashes— "/f"— instead of back slashes as previously—"\f". Was this intentional?


2024-01-02 09:45:24

Andrew

Barry, the answer is yes, and in a similar way. The table of contents field {TOC} has a "\b BookmarkName" bookmark switch which "Collects entries only from the portion of the document marked by the specified bookmark."


2023-12-29 04:11:48

Barry Pegram

Hi. Thank you once more for all of the tips. Regarding the Multiple Indexes... is it possible to do a similar thing with the TOC and if so how, please.


2023-12-23 06:16:50

Roger

Hi
Thanks for the above tip ref two indexes ie Places and People.
I use the (excellent) concordance file method for indexing. Is there a way of using a Place Concordance file and a People Concordance file to achieve the same?
Regards
Roger


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.