logo
search
Office for Mac Issues

How to Fix Word for Mac Showing Table of Contents Field Code

Kushani NimanthikaKushani Nimanthika Oct 1, 2026 869 views

Question details

The user needs to restore their Table of Contents from a raw field code format back to its normal, readable text view in Word for Mac.

How to Fix Word for Mac Showing Table of Contents Field Code
Product
Microsoft Word for Mac
Device & OS
Mac
Scenario
Viewing or formatting a document that contains an auto-generated Table of Contents.
Observed behavior
Word for Mac displays the underlying field code, such as {TOC \o "1-3" \h \z \u}, instead of showing the fully formatted table of contents.
Before you start

Ensure your document is saved and that you have not accidentally typed inside or deleted parts of the bracketed {TOC} code, as modifying the raw text can break the table of contents generation.

Solution 1Recommended

Use the Mac Keyboard Shortcut to Toggle Field Codes

The quickest way to switch between displaying field codes and their actual results is by using a built-in Mac keyboard shortcut.

Microsoft Word includes a universal toggle for switching between field codes and values. On Mac keyboards, this shortcut relies on the function keys.

1
Select the TOC Code

Click anywhere inside or highlight the entire {TOC \o "1-3" \h \z \u} text in your Word document.

2
Press the Keyboard Shortcut

Press Option + F9 on your Mac keyboard. Depending on your Apple keyboard settings, you may need to press Option + Fn + F9 to activate the standard function key.

3
Verify the Output

The field code should instantly disappear and be replaced by your formatted, clickable Table of Contents.

Use the Mac Keyboard Shortcut to Toggle Field Codes
Windows Shortcut: If you ever switch to Word for Windows, the equivalent shortcut to hide field codes is Alt + F9.
Free Microsoft Office alternative

Experience Hassle-Free Document Formatting with WPS Office

Tired of dealing with confusing field codes and formatting glitches in Microsoft Word for Mac? WPS Office provides a free, lightweight, and highly intuitive alternative that handles Tables of Contents effortlessly while keeping the user interface clean and accessible.

  1. 1. Install WPS Office for Mac: Download and install the free WPS Office suite from the official website or Mac App Store.
  2. 2. Open Your Document: Right-click your .docx file and choose to open it with WPS Writer. Your formatting will be perfectly preserved.
  3. 3. Manage Table of Contents: Navigate to the 'References' tab to easily insert, update, or customize your Table of Contents using a clean, visual menu without any raw field codes.
Fully compatible with Microsoft Word (.docx) formats, ensuring your Table of Contents and document layouts remain intact.Intuitive interface that automatically formats your document references without exposing raw, confusing field codes by default.Lightweight architecture that runs smoothly on Mac devices with minimal system resource usage.Completely free to download and use with a seamless migration process from Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why did my Table of Contents suddenly turn into a field code?

This usually happens if you accidentally hit the field code toggle shortcut (Option + F9) while typing, or if a global settings update in Word for Mac forced the application to display field codes instead of their calculated values.

What does the {TOC \o "1-3" \h \z \u} text actually mean?

This is a specific field code instruction for Word. 'TOC' means Table of Contents, '\o' defines the heading levels to include (levels 1 through 3), '\h' makes the entries act as clickable hyperlinks, '\z' hides tab leaders in Web Layout, and '\u' builds the table using outline levels.

Will the {TOC} field code print on paper if I export to PDF?

Yes. If the raw field codes are currently visible on your screen, they will likely be printed on paper or rendered into your exported PDF. You must toggle them back to display the formatted results before printing or exporting.

Why isn't the Option + F9 shortcut working on my Mac?

Depending on your specific Mac keyboard settings, the F9 key might be mapped to a system function like Mission Control. To trigger standard application function keys, you need to hold down the 'Fn' key as well, making the shortcut Option + Fn + F9.