logo
search
Document Editing Problems

How to Fix a Malformed Multilevel Index in Word

Maira MehtabMaira Mehtab Sep 28, 2026 869 views

Question details

The user needs to fix a malformed multilevel index in a Word document, which exhibits repeated index groups, incorrect entry order, and wrong page numbers.

Product
Microsoft Word
Device & OS
not provided
Scenario
Editing a document with numerous XE (Index Entry) fields and complex formatting changes.
Observed behavior
The generated index displays repeated groups, incorrect alphabetical order, and inaccurate page numbers instead of a clean, structured multilevel list.
Before you start

Before making bulk changes to field codes or running VBA macros, verify that hidden characters are visible so you can see the XE fields.

Solution 1Recommended

Inspect and Correct XE Fields and Formatting

Manually check the hidden XE (Index Entry) fields, section breaks, and index switches to identify the cause of the malformed entries.

Inconsistencies such as extra spaces, different capitalizations, or conflicting switches inside XE fields are the most common causes of repeated index groups and sorting errors.

1
Show Hidden Characters

Navigate to the Home tab and click the 'Show/Hide ¶' button to reveal hidden formatting marks and XE field codes in your document.

2
Locate and Fix XE Fields

Find the affected XE fields in the text. Ensure that the text exactly matches across entries that should be grouped together, removing any trailing spaces or inconsistent capitalization.

3
Check Page Layout and Breaks

Look for unintended section breaks near the affected entries. If a section break is set to restart page numbering, right-click the page number in the footer, select 'Format Page Numbers', and choose 'Continue from previous section'.

4
Update the Index

Right-click anywhere inside the generated index and select 'Update Field' to apply your manual corrections.

Powerful Document Editor

Create and Manage Indexes Easily with WPS Writer

WPS Writer offers a highly compatible and intuitive environment for managing complex documents. You can easily insert, edit, and update multilevel indexes without dealing with overly complex field codes.

  1. 1. Open Your Document: Launch WPS Writer and open your existing Word document containing the index.
  2. 2. Manage References: Navigate to the 'References' tab on the top ribbon to access the built-in index and table of contents features.
  3. 3. Update Index: Right-click your generated index and select 'Update Field' to instantly refresh page numbers and entry groupings.
Seamlessly compatible with Microsoft Word (.docx) formats and field codes.Intuitive References tab for creating and updating document indexes easily.Lightweight software that handles large documents and extensive indexes smoothly.Free built-in tools for professional document formatting and layout management.
microsoft office alternative - wps office

Frequently Asked Questions

What is an XE field in a document?

An XE (Index Entry) field is a hidden code block that marks specific text to be included in the document's index. It stores the exact entry name, subentries, and formatting switches used to generate the final index.

Why is my index showing repeated groups instead of merging them?

Repeated index groups usually occur when there are minor inconsistencies within the XE fields. Even a single extra space, a change in capitalization, or different formatting applied to the hidden text will cause the index to treat them as entirely separate groups.

How do I make XE fields visible in my document?

You can make XE fields visible by turning on hidden formatting symbols. Go to the Home tab and click the Show/Hide ¶ icon (or press Ctrl+* on your keyboard) to reveal them.

Can a section break cause incorrect page numbers in an index?

Yes. If a section break is configured to restart page numbering at 1, the index will reflect those restarted numbers. You must adjust the page number formatting in the header/footer settings to 'Continue from previous section' if you want continuous numbering.