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).
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.
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.
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.
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 *
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:
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.
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.
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. In 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.
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.
3. Key Takeaways
And that, my friend, is how to build and maintain an index page in Word with no loose ends.
4. What Next?
I hope you found plenty of value in this post. I'd love to hear your biggest takeaway in the comments below together with any questions you may have.
Have a fantastic day.
About the author
Jason Morrell
Jason Morrell is a professional trainer, consultant and course creator who lives on the glorious Gold Coast in Queensland, Australia.
He helps people of all levels unleash and leverage the power contained within Microsoft Office by delivering training, troubleshooting services and taking on client projects. He loves to simplify tricky concepts and provide helpful, proven, actionable advice that can be implemented for quick results.
Purely for amusement he sometimes talks about himself in the third person.
SHARE
This was nicely explained. I only have the Index in alphabetical order but without large letter headers to make it easy to find an entry. How can I add those?
Hi David. There are two ways to include the header letter.
What you presented was very clear. I didn’t know how to do any of it. Now that I’ve experimented, I have a problem. I have a main entry as the Surname of an individual and the sub as the 1st & middle names. When I click mark all, it marks all of the entries with that surname but complete ignores the subentry. I need it to mark the main entry (surname) and then list all those individuals who share that surname underneath with page #s.
Main: Pritchard
Sub: Sally Ann
Main: Pritchard
Sub: Martin
When I enter the 1st Pritchard and click “mark all”, it picks up every Pritchard in the document and ignores any subentries other than the 1st one.
Pritchard
Sally Ann 7, 8, 10, 17, 26, 30, 48, 49, 50, 59 (this is every entry with “Pritchard” listed as a main entry, ignoring the other subentries.)
What can I do?
Thanks!
You’re very close Ron. Here’s the correct approach:
1. Select Sally Ann Pritchard in the document.
2. In the Index dialog, set Main to Pritchard and Sub to Sally Ann.
3. Select Martin Pritchard in the document.
4. In the Index dialog, set Main to Pritchard and Sub to Martin.
The resulting index will display:
Pritchard
Martin ….. 7
Sally Ann …8
The field code should look like:
{ XE “Pritchard:Martin” }
{ XE “Pritchard:Sally Ann” }
Let me know how you go.
Jason
Thank you so much. Not sure what I was doing but after doing it exactly the way you recommended, it worked. 🙂
You’re welcome Ron.
The explanation is concise and clear. I learned at once how to build an index.
Great to hear Mohamed.