Written by Allen Wyatt (last updated November 29, 2022)
This tip applies to Word 2007, 2010, 2013, and 2016
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:
{ INDEX \b MySection }
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 included those index entries that use the \f switch followed by the letter "a".
Adding the switch to the XE fields is handy, but suppose that you've already created your index entries without using the \f switch. If you want to later add the \f switch to the XE fields in the section, you can do it by following these steps:
You can find additional information about these steps in the Microsoft Knowledge Base:
http://support.microsoft.com/?kbid=154025
Even though the Knowledge Base article is for much older versions of Word, it will still work with your version because the behavior of the index-related fields it uses has not changed since the earliest versions of Word.
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, and 2016. You can find a version of this tip for the older menu interface of Word here: Multiple Indexes in a Document.
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!
When you construct an index you need to insert all sorts of index fields throughout your document. If you want to later ...
Discover MoreIn order to create an index, you first need to create the entries that will be used to compile the index. Here's how you ...
Discover MoreThere are several ways you can create an index in Word, but the first step is always to figure out what should go in the ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2019-09-14 19:25:43
Christine
Good morning Allen from sunny Western Australia
I also need to create two indexes, but they both need to be of the whole document.
Is there a way to do this? If I use the \f "a" and \f"b" switches throughout the document on the appropriate entries, could I then create two indexes of different subjects (eg a=Names and b=Locations) for the whole document?
Thanks
Chris
2019-02-18 20:25:03
Grace Michael
Hello, Allen ... I have read and done everything that you say in your post about creating Multiple Indexes in a document. However, I cannot find a way to get word to create one Index one index over another (one set of \f switchedover another). Example: If one \f indexes People's Names, and another \f indexes Topics how do I get word to create the separate indexes? Word will create the first index that I create (\f People's names), but not the second index (\f Topics). I have both Word 2010 and Word 2016 on different computers. In the Reference tab, in the Index section, when I click "Insert Index," I have no option to tell Word which Index I want - People's names or Topics. I have researched the web, and instructions about using the \f switch are numerous, but I cannot find a way (except in an older version of Word which I don't have) that will let me select which Index I want created. Can you tell me what I am missing or what I need to do (and/or how) so I can tell Word which Index to create? Thank you for any help you can give me.
Grace
Grace Michael
2018-12-12 20:37:40
Delma Sweeney
Hi Allen
The Microsoft link in this article does not work.
Cheers
2017-02-06 13:33:32
Jessica Davis
You can also use this tip for building chapter level Tables of Contents, using the TOC field. This is a very useful tip for me. Thank you!
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.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2023 Sharon Parq Associates, Inc.
Comments