Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Including Section Numbers in an Index.

Including Section Numbers in an Index

Written by Allen Wyatt (last updated October 13, 2021)
This tip applies to Word 97, 2000, 2002, and 2003


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 (1580) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Including Section Numbers in an Index.

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

Using the Drawing Grid

One of the lesser-known drawing tools provided in Word is the drawing grid. You can easily turn this feature on and use ...

Discover More

Finding Workbooks Containing Macros

Workbooks can contain macros, or not. It is entirely up to you whether they do or not, but at some future time you might ...

Discover More

Shortcut for Show/Hide

Hate to take your hands off the keyboard? Here's a handy keyboard shortcut you can use to display (or not display) the ...

Discover More

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!

More WordTips (menu)

Multiple Indexes in a Document

Adding a single index to a document is fairly easy. What if you want to add multiple indexes, however? And what if you ...

Discover More

Specifying an Index Entry Separator

One of the switches you can use with the index field allows you to specify how index entries should be separated from the ...

Discover More

Inconsistent Formatting in an Index

When indexing a document, you may find that some of your index entries aren't formatted the save as your other index ...

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 1 + 1?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon 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.