Word Index: Using Mark and Index to build an index page in Word | Office Mastery
Office Mastery
S H A R E
Assign a 'primary' menu

How to Build a Dynamic
Microsoft Word Index Page
Using 'Mark & Index'

Word index using mark and index

In this post, I'll share how to build a dynamic Microsoft Word index (i.e. one you can update automatically without having to rebuild it) using the Mark & Index method.

A Word Index (example shown below) provides a very useful reference for the reader.

Unlike a structured table of contents where the reader scans a general list of topics until they find a one of interest), a Word index allows the reader to search for a specific word or phrase, normally in alphabetical order and go straight to the relevant page (or pages).

Example Word Index

1. Creating a Word Index using Mark & Index

There are two steps for generating an index. Firstly, you must work through your document and ‘mark’ anything that you would like to include in the index. Then, you compile the index, using the marked entries.

Each time you mark an entry, an XE field code is inserted into the document, like this:

{ XE “index entry text” }

XE stands for Index Entry.

Word switches hidden formatting on as soon as you mark an entry so it doesn't take long before your document starts to look messy. But don't worry - when you print your document, field codes are not printed.

Word Index - field codes soon make the document look messy

But don't worry - when you print your document, the field codes are not printed.

As your Word index grows, It can sometimes be quite hard to locate and isolate a particular index entry to modify or remove it. 

For this reason, many editors use a concordance file, which is a table in a separate document that lists everything to be indexed. This file can then be used to compile the index, leaving the original file squeaky clean and making maintenance easy.

Post: How to create a Word Index using a Concordance file.

Step 1a: Mark a main entry

To mark an entry:

1.  Highlight the text that should appear in the index.

2.  In Word, select the References tab.

3.  Click the Mark Entry icon in the Index group

    The Mark Index Entry dialog box is displayed. The text that you highlighted is displayed in the Main Entry box. This is the text that will appear in the index. You can modify it if you wish.

Marking an entry for a Word Index

    It’s worth learning the keyboard shortcut for marking entries, as you will probably use it a lot when working with large documents. To display the Mark Index Entry dialog box, press

ALT + SHIFT + X

4.  Click the Mark button to mark only this occurrence of the word or phrase

Click the Mark All button to flag every occurrence of the word or phrase within the document.

5.  Rinse and repeat for each word or phrase you want to include in the index. To save time, you can leave the Mark Index Entry dialog box open – you don’t need to close it for every entry you select a new entry.

An XE field code is inserted into the document

{ XE “index entry text” }  

The text within the quotation marks is what appears in the index. It does not have to be the same as the text in the document so you can edit it if you wish.

Guidelines for marking index entries in Word:

  • Spell out abbreviations, e.g. CPU (Central Processing Unit).
  • Simplify words or phrases, e.g. change ‘legalities’ to ‘law’.
  • Avoid multiple entries of the same keyword, e.g. installing, installations, install procedures. Instead, use one entry – “Install” and list the others as sub-entries (discussed shortly).
  • Avoid starting an entry with a vague or ambiguous word, e.g. ‘using’ or ‘to’ or an adjective, e.g. use ‘contact’ rather than ‘multiple contacts’.
  • Indexing is case sensitive

Step 1b: Mark a subentry

Subentries are a powerful way of grouping similar items in an index. Let’s say we wanted to index various sub-entries around the main word Console:

  • 3DS console
  • Switch console
  • Game Boy console

If the reader searches the index for Console, they can be redirected to the page(s) for the specific console they are interested in.

In this example, the Main Entry is Console and the 3 subentries are 3DS, Switch and Game Boy.

1.  Find the word 3DS in the text and select it.

2.  Press Alt+ Shift + X

3.  Enter 'Console' into the Main Entry and '3DS' into the Subentry. Entries will appear in the index exactly as you type them so take care not to misspell anything and be consistent with upper case and lower case.

Word index subentry

4.  Click the Mark or Mark All buttons.

Step 1c: Cross-reference another indexed item

Cross-references are used to direct someone who is searching for one thing to another. For example, if someone searches for Music, the index could say See Audio, or if someone searches for Food, the index could point them towards Nutrition.

Index cross-references should not be confused with the standard Word cross-reference feature which can be found on the Insert menu.

To create an index cross-reference:

1.  Select the text to be marked.

2.  Press ALT + SHIFT + X

3.  Confirm the text in the Main Entry box.

4.  Select the Cross-Reference radio button.

5.  After “See” type the synonymous text item.

Word index cross reference

Step 2: Compile the Word Index

Now that all the entries have been marked it is time to create the index itself.

1.  Select the References tab.

2.  Click the Insert Index icon in the Index group. The Index dialog is displayed.

3.  Choose a Format from the drop-down list. Be aware that different formats select, deselect or change some of the other options in the dialog. The safest approach is to start at the bottom left  and work upwards, then to the right.

4.  Ensure that Right-align page numbers is selected.

5.  Select a tab leader (the tab leader fills the gap between the end of the item and the page number - dots work best).

6.  Choose whether to use Run-In or Indent (watch the preview).

7.  Choose how many columns to display in the index.

8.  Click OK

Step 3: Update the index (whenever needed)

1.  MIn the document, mark any new text you wish to include in the index and remove any existing XE field codes that you no longer require.

2.  Click anywhere on the index to show grey shading.

Word Index - click on the existing index to display the grey shading

3.  Press F9 to refresh the index.

Alternatively, right-click and choose Update Field from the context menu or click the Update Index button on the References ribbon).

2. How to remove all field codes from a document

Ideally, a document should be finished before creating an index, but if significant changes have occurred you may want to clear any XE field codes throughout the document and start from scratch. Here's a simple process to get that job done.  

1.  Press CTRL H to display the Replace dialog. Alternatively, click the Find & Select icon on the far-right side of the Home ribbon, then choose Replace.

2.  In the Find box, type ^d (press SHIFT 6 to get ^).

3.  Leave the Replace box empty.

4.  Click Replace All (or Find then Replace to process one by one).

Using ^d will remove every field in the document, not just the XE field codes. It is a special character that finds braces (curly brackets) that enclose field codes.

To remove just the XE field codes, use ^d XE.

Remove field codes from a document

3. The key points again

  • To create a back-of-book index, text entries should first be marked. The index is then built from the list of marked entries. The index tools are located in the Index group on the References ribbon.
  • Entries may be marked once or every time they appear in the document.
  • Marked entries have a field code, e.g. { XE "Text to appear in index" } inserted directly after them.
  • Field codes are only visible while displaying hidden formatting. They are not printed.
  • Press Alt Shift X to display the Mark Index Entry dialog box.
  • The Mark Index Entry dialog can be left open allowing you to switch between it and the document to mark multiple entries.
  • A main index entry may have a number of sub entries.
  • An index entry may cross-reference another index entry, if it is a similar item.
  • An index may also be created using a concordance file (covered in this post).

And that, my friend, is how to build and maintain an index page in Word with no loose ends.

If this post helped, or you have a question, drop a quick comment below. I always love to hear from my readers. Here's to your learning and success. Enjoy the rest of your day.

Jason Morrell blog signature
Jason Morrell, Office Mastery

About the author

Jason Morrell


Jason loves to simplify the hard stuff, cut the fluff and share what actually works. Things that make a difference. Things that slash hours from your daily work tasks. He runs a software training business in Queensland, Australia, lives on the Gold Coast with his wife and 4 kids and often talks about himself in the third person!

SHARE

>