Word Index: Using a concordance file 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 a Concordance

Word index using concordance

BY JASON MORRELL

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 a concordance file.

A concordance provides several benefits over using the Match & Index method that most people use:

  • Simpler to maintain the list of indexed words
  • Simpler to maintain and update the marked entries in the main document
  • A single concordance can be used across multiple workbooks

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

There are two steps for generating an index.

First, ‘mark’ the items you want to appear in the index (from the concordance). Then, you compile the index, using the marked entries.

Every entry that is marked has an XE field code inserted immediately after it, 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

As your Word index grows, the benefits of a concordance file become clear. 

(This alternative post covers how to build a Word index using the Mark & Index method)

2. How to create a Word index using a concordance file

Many editors use a concordance file to generate an index for a document. A concordance file is a two-column table that is created in a separate document.

  • ​The left column contains the entries to be marked in the document.
  • The right column defines what appears in the index.
  • If a text item is separated with a colon then the first part is the main entry and the second part is a sub entry (as pictured in the blue section below).
  • Concordance entries are case sensitive, so if a word appears capitalised and not capitalised at various points through the document, create two entries, one for each case variation in the left-hand column, and a common variation in the right-hand column (as pictured in the yellow section below).
  • The concordance also provides a good opportunity to handle singles, duplicates and other word variations. Place all the variations in the left column and a common entry for each in the right column (as pictured in the grey section below).
How to set up a Word concordance file

Step 1: Mark entries within a Word document using the pre-prepared concordance file

1.  Select the References tab.

2.  Click the Insert Index icon in the Index group.

3.  Click the AutoMark.. button.

Automark a document using a concordance file in Microsoft Word

4.  Locate and select the concordance file and click OK.

All entries within the main document are now marked.

Step 2: Create the index

1.  Select References | Insert Index again to display the Index dialog.

Compilimg the Word Index

2.  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.

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

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

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

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

7.  Click OK

Step 3: Update the concordance and/or index (when needed)

1.  Open the concordance file, make your changes and save the file.

For accuracy, it's best to clear the current XE codes from the main document. This allows the index to be updated with no loose ends and caters for items that have been added, changed or removed from the concordance.

2.  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.

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

^d  is a special character that finds braces (curly brackets) that enclose field codes. Many field codes can be used in Word. Using ^d by itself removes every  field code from the document. ^d XE removes only the XE field codes.

4.  Leave the Replace box empty.

Remove field codes from a document

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

And finally, re-mark and refresh

6.  Select References | Insert Index | Automark.

7.  Click on the existing index to display the grey shading.

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

8.  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).

4. 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.
  • 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.
  • To mark entries using a concordance file, click References | Insert Index | AutoMark.
  • To create the index, click References | Insert Index. Set your preferences and click OK
  • To update the index, first, update the concordance, then remove the existing XE field codes in the main document (using the special ^d  character in the Find and Replace tool), and finally remark and refresh the index by pressing F9.

And that, my friend, is how you build an index page in Word (using a concordance) 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

  • James Darnall says:

    Jason,
    I’ve examined explanations of this topic and, they have all been helpful to a point, yet incomplete. They simply did not aid in the overall understanding of how this works, why things are done in a certain order and how to update the table. Your explantion is excellent! The best I’ve seen.
    I have a question:
    Do we need two Section markers at the end of the document for the Index?
    Regards,
    JD

    • Jason Morrell says:

      Hi James
      Thank you for your kind words. Word inserts the continuous section breaks before and after the index. They are required to allow the index to have independent settings such as a chosen number of columns and tab positioning without impacting the rest of the document.
      Jason

  • >