Do you have to deal with broken word table of contents links? Feeling a sense of DTP frustration? Before you start pulling at your hair strings, remember, our ancestors had to work in a time with no backspace, ctrl-z or Google. Luckily for you (and your ha
irline!), we can solve this problem in a matter of minutes.
If you stumbled across this blog, chances are:
- You have text placed in a text box
- You converted that text into a Table of Contents heading
- You published your Microsoft Word document as a PDF file
- The TOC links in your PDF document now redirect to a “page not found” error message
Why Create Word Table of Contents (TOC) Headings out of Text Boxes?
Before I dive into our solution, an obvious question that I think warrants some sort of explanation is why anyone would want to create TOC headings out of text boxes in the first place.
Answers are going to vary, but more often than not, this is for design purposes. In my case, the designer wanted to add titles in a higher position of the document than normal margins would allow, but also wanted to avoid placing the text into a header to be repeated on multiple pages.
Now for the solution…
The 3-Minute Fix For Broken Word Table of Contents Links
Clicking on our PDF Table of Contents items (which come from the text in our text boxes) currently give us this error message:
Look familiar? The reason for the broken link is easy to see. The link is an absolute path even though the location is within the same file. And since you published the document as pdf, the path for the Microsoft Word document is no longer valid. Quite a valid reason for that sad page.
Our other Table of Contents items (not coming from text boxes) work well since they are relative links. All we need to do is change a single line of code that is blocking our links from directing properly.
1. Go to the item that has a problem and right-click on it.
2. Select “Toggle field codes”
This displays our page code:
3. The first line is our trouble case. We need to make the first line identical to the second line, like so (remove the absolute path and convert it in to a relative link):
Now we can save our file as a PDF and the issue should be resolved.
A Few Additional Tips
1. The new file path might not update right away. If the issue isn’t solved, try saving and closing your document, then reopen it to publish your PDF file.
2. If you are trying to add your text (currently in a text box) as a table of contents item by using the right-click menu, the menu won’t show up. Instead, you can add it by adjusting the style of your text. For help, refer to this page.
Although this is a relatively minor problem, your users expect links to work correctly. These few simple clicks can make your nearly perfect PDF document absolutely perfect.
Have questions? Don’t hesitate to post them in the comments below or send us a message.