How to Fix Word for Mac Showing Table of Contents Field Code
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.

- 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.
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.
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.
Click anywhere inside or highlight the entire {TOC \o "1-3" \h \z \u} text in your Word document.
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.
The field code should instantly disappear and be replaced by your formatted, clickable Table of Contents.

Toggle Field Codes Using the Right-Click Context Menu
If the keyboard shortcut does not work for you, you can manually toggle the field code display using your mouse and the context menu.
Disable Global Field Code Display in Preferences
Sometimes, Word preferences get globally set to always show field codes instead of their values, affecting all documents.
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. Install WPS Office for Mac: Download and install the free WPS Office suite from the official website or Mac App Store.
- 2. Open Your Document: Right-click your .docx file and choose to open it with WPS Writer. Your formatting will be perfectly preserved.
- 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.

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.




