logo
search
PDF Conversion Issues

How to Fix Word Table of Contents Links Not Working in PDF

Amos GikundaAmos Gikunda Oct 21, 2026 868 views

Question details

The user needs to ensure that Table of Contents entries in a Word document remain clickable hyperlinks after exporting the file to PDF.

Product
Word, PDF
Device & OS
not provided
Scenario
Exporting a Word document containing a built-in Table of Contents to a PDF file.
Observed behavior
The exported PDF displays the Table of Contents as static text, and the heading entries are not clickable hyperlinks.
Before you start

Ensure your document uses standardized heading styles (Heading 1, Heading 2, etc.) and that the Table of Contents was generated using the built-in reference tools rather than typed manually.

Solution 1Recommended

Enable the Hyperlink Switch in the TOC Field Code

Modify the Table of Contents field code to include the hyperlink switch, instructing the processor to make the text entries clickable in the exported PDF.

In Word documents, the Table of Contents is generated using a specific field code. If this field code lacks the hyperlink switch (\h), only the page numbers might be clickable, or the entire TOC may become static text upon PDF conversion.

1
Reveal Document Field Codes

Open your Word document and press the 'Alt + F9' keyboard shortcut. This will toggle the view from formatted text to the underlying field codes.

2
Locate the TOC Field Code

Scroll to your Table of Contents. It should now appear in brackets, looking similar to { TOC \o "1-3" }.

3
Insert the Hyperlink Switch

Click inside the brackets and type \h at the end of the code string, so it reads exactly like { TOC \o "1-3" \h }.

4
Hide Field Codes

Press the 'Alt + F9' keyboard shortcut again to hide the field codes and return to the normal document view.

5
Update the Table of Contents

Right-click anywhere on the Table of Contents, select 'Update Field' from the context menu, and then choose 'Update entire table'.

6
Export to PDF

Navigate to 'File' > 'Save As' or 'Export', choose PDF as the file format, and save the document. Open the resulting PDF to verify the links are working.

Enable the Hyperlink Switch in the TOC Field Code
Verify Export Settings: When exporting or saving as PDF, ensure that your application's PDF options have 'Create bookmarks using headings' enabled to maximize document navigability.
Native PDF Conversion

Create and Export Clickable PDFs Seamlessly with WPS Office

WPS Writer simplifies document formatting and PDF conversion. When you use built-in heading styles and generate a Table of Contents, WPS automatically preserves your clickable hyperlinks during PDF export without requiring you to manually adjust complex field codes.

  1. 1. Open Your Document in WPS Writer: Launch WPS Office and open the Word document containing your Table of Contents.
  2. 2. Access the Export Tool: Click the 'Menu' button in the top-left corner, go to 'Export to PDF', and click to open the export dialog.
  3. 3. Verify Export Options: In the Export to PDF window, ensure the settings allow for high-quality export and click 'Export'.
  4. 4. Check Your Clickable PDF: Save the file to your desired destination. Open the resulting PDF in any reader to instantly use your fully clickable Table of Contents.
One-click 'Export to PDF' automatically preserves all active Table of Contents links and heading bookmarks.Highly compatible with Microsoft Word (.docx) formats, field codes, and complex document structures.Intuitive user interface for quickly generating professional, highly customizable Tables of Contents.Free, lightweight, and fast office suite tailored for seamless document management.
microsoft office alternative - wps office

Frequently Asked Questions

Why are only the page numbers in my Table of Contents clickable in the PDF?

If the Table of Contents field code lacks the \h switch, the word processor is instructed to hyperlink only the page numbers instead of the full heading text. Adding the \h switch to the TOC field code resolves this issue.

What does the \z switch do in a Table of Contents field code?

The \z switch is used specifically to hide page numbers when viewing the document in Web Layout view. It is not required for making TOC entries clickable in an exported PDF.

Will standard URL hyperlinks still work if the TOC links fail during PDF export?

Yes, standard internet URL hyperlinks and document bookmarks typically continue to work properly in the exported PDF, even if the TOC field code is missing the hyperlink switch.

How do I update my Table of Contents after editing the field codes?

Right-click anywhere inside your Table of Contents text and select 'Update Field' from the dropdown menu. If prompted, select 'Update entire table' to apply your field code changes and refresh the entries.