Word Doesn't Include Page Ranges in Index

Last reviewed: February 3, 1998
Article ID: Q119861
The information in this article applies to:
  • Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-cd, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows
  • Microsoft Word 98 Macintosh Edition
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a

SYMPTOMS

When an item to be indexed appears on consecutive pages, Word represents those pages individually in the index, rather than showing them as a range. This happens even when you use the \g switch to gather ranges.

For instance, if the word "Apple" appears on pages 4, 5, 6, and 7, Word lists each page separately in the index

   Apple, 4, 5, 6, 7

rather than showing a range:

   Apple, 4-7

Using the \g switch without also using bookmarks and XE fields will not change the way the index appears.

CAUSE

By design in Word, when you compile an index in a document that contains multiple XE fields for identical index entries, Word lists a page number for each index entry (for example, Apple, 4, 5, 6, 7). In contrast, when the range of pages is bookmarked, Word compiles the index showing this range (for example, Apple, 4-7).

WORKAROUND

Use bookmarks and a special XE field to tell Word to show a range for certain words.

Word Versions 6.x, 7.x, 97, and Word 98 Maintosh Edition

  1. Highlight the range of pages on which the word appears.

  2. On the Insert menu, click Bookmark.

  3. Type a name for the bookmark. A good name to use is the word you are indexing.

  4. Click Add.

  5. Place the insertion point somewhere in the area you applied the bookmark to.

  6. On the Insert menu, click Index And Tables.

  7. Select the Index tab.

  8. Click Mark Entry.

  9. In the Main Entry box, type the word as you want it to appear in the index.

  10. Select the Page Range option.

  11. In the Bookmark box, select the bookmark name you applied.

  12. Click Mark.

  13. Click Close.

When you insert the index, it will include the range over which the word appears. An en dash separates the page numbers. If you would like to change this character, see the "More Information" section of this article.

Word Version 2.x

  1. Highlight the range of pages on which the word appears.

  2. On the Insert menu, click Bookmark.

  3. Type a name for the bookmark. A good name to use is the word you are indexing.

  4. Click OK.

  5. Place the insertion point somewhere in the area you applied the bookmark to.

  6. Turn on Show All Characters, if it is not already on.

  7. Press CTRL+F9 to insert field braces.

  8. Type in the field, so it appears like this:

          {XE "word" \r "bookmarkname"}
    

When you insert the index, it will include the range over which the word appears. An en dash separates the page numbers. If you would like to change this character, see the More Information section below.

MORE INFORMATION

By default, Word uses an en dash to separate the beginning and ending pages in an indexed range. You can specify a different separation character by using the \g switch.

To specify a different separator, add the \g switch and the separator character, with the separator in quotation marks.

   This field               Yields this result
   --------------------------------------------------------

   { INDEX \g " to " }      Apples, 4 to 7
   { INDEX \g ":" }         Apples, 4:7


Additional query words: index entry xe bookmark range page pages switch
Keywords : kbfield macword winword word6 word7 word95 word97
Version : WINDOWS:2.0,2.0a,2.0a- CD,2.0b,2.0c,6.0,6.0a,6.0c,7.0,7.0a,97;MACINTOSH:6.0,6.0.1,6.0.1a,98
Platform : MACINTOSH WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.