How to Fix Extra Spaces Before Page Numbers in a Word Index on Mac
Question details
The user needs to remove unwanted extra spaces that appear before page numbers in an automatically generated Word index on Mac.

- Product
- Microsoft Word
- Device & OS
- Mac
- Scenario
- Formatting a document index and aligning page numbers with dot leaders.
- Observed behavior
- Extra spaces appear before the index page numbers, often pushing the first number to the left until the dot leader disappears, especially when using multi-column layouts.
Ensure your document is saved and familiarize yourself with the Option + F9 keyboard shortcut on Mac, which is required to reveal the underlying field codes in your document.
Adjust the Index Field Code and Alignment Switch
Modifying the underlying field codes of your index can correct spacing and alignment issues directly.
Word indexes are generated using background field codes. If your page numbers have too much space or align incorrectly, the alignment switch within this code might be causing the conflict.
Select the entire index in your Word document and press Option + F9 on your Mac keyboard to display the underlying field codes.
Locate the INDEX field code. Look for an alignment switch (such as \e or similar tab spacing codes). Adjust or delete this switch so that the page numbers are instructed to begin closer to the index entry.
Press Option + F9 again to hide the field codes. Right-click anywhere inside the index and select 'Update Field' to apply the formatting changes.

Modify the Index Style and Column Layout
Changing the column layout and index style gives page numbers and dot leaders more room to display correctly without forcing extra spaces.
Format Documents Flawlessly with WPS Office
If you are struggling with complex formatting issues and field codes in Microsoft Word on your Mac, WPS Office offers a free, lightweight, and highly compatible alternative. Enjoy a familiar interface where creating and formatting indexes works seamlessly without the hassle of extra spacing.
- 1. Download and Install: Get WPS Office for free from the official website and easily install it on your Mac.
- 2. Open your Document: Open your existing Word document in WPS Writer; all your text and references will be perfectly preserved.
- 3. Create or Update an Index: Navigate to the References tab to quickly generate, format, or update your index with correct spacing.

Frequently Asked Questions
Why do dot leaders disappear in my Word index?
Dot leaders often disappear when long index entries push the page numbers too far to the right, leaving insufficient space in narrow columns. Switching to a single-column layout or modifying the Index style tab stops can resolve this.
How do I view field codes in Microsoft Word on a Mac?
You can toggle field codes on and off by highlighting the text or index and pressing the Option + F9 keys simultaneously on your Mac keyboard.
Can I fix index spacing issues without manually editing field codes?
Yes, you can often fix spacing issues by going to the References tab, clicking Insert Index, and adjusting the predefined formats, dot leaders, and column settings to give your entries more room without touching the raw code.




