Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. 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: Including Section Numbers in an Index.
Written by Allen Wyatt (last updated September 12, 2020)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365
Word allows you to create dynamic indexes for your documents. These indexes can be generated, as needed, to reflect changes in page numbers within the document. The simplest of indexes contain only page numbers for the items being indexed. You may, however, want to create an index that also includes section numbers for entries.
There are two ways you can approach putting section numbers in an index. The easiest way is if the sections are just that—sections of your Word document, separated by section breaks. In this case, you can use compound fields, so your index entries look something like this:
{XE "My Index Entry" \t "{SECTION}:{PAGE}"}
In this case you are using the \t switch to indicate that you want Word to substitute the text following the switch for the actual page number. Normally the \t switch is used for cross-references, but in this instance, you are telling word to substitute the section number (generated by the SECTION field) followed by a colon and the page number (generated by the PAGE field). If you use this XE field to mark an index entry on page 6 of section 2, then the generated index will look like this:
My Index Entry. 2:6
The other method of including section numbers in your index comes in handy if your "sections" do not correspond to actual Word document sections. In this instance you use a different INDEX field to actually generate your index:
{INDEX \s MySection \d ":"}
The \s switch tells Word that you want the page numbers in the index to include the sequence number designated by the term following. In this instance, the entries in the index will include the number associated with the MySection sequence, followed by the character specified by the \d switch (a colon), and the page number. The sequence, of course, is set within the document by using the SEQ field:
{SEQ MySection}
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9138) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Including Section Numbers in an Index.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!
Adding a single index to a document is fairly easy. What if you want to add multiple indexes, however? And what if you ...
Discover MoreAdding an index to a document is an easy task. There are a couple of ways you can do it, as described in this tip.
Discover MoreWhen indexing a document, you may get some funny results once in a while. If you get single index entries when you were ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-11-17 08:12:47
Jan
Useful tip, but strange that it's only possible to use the section number and not the full header reference, i.e. including the subsection numbers.
2021-02-01 05:35:10
Diana Burke
Mr. Wyatt, I am a subscriber. Thank you very much for your helpful tips. is it possible to create an index in which each entry lists both the paragraph number (an autonumber based on a style) and also the page number? 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 © 2024 Sharon Parq Associates, Inc.
Comments