View Single Post
 
Old 05-11-2020, 04:04 PM
tlafferty tlafferty is offline Windows 10 Office 2016
Novice
 
Join Date: May 2020
Posts: 1
tlafferty is on a distinguished road
Default Use VBA to insert cross references by looping through entire document from insertion point to end

I'd like to use VBA to insert a cross reference link to the table of contents for every time it finds the text "Click to Return to Table of Contents"

This can't be an ordinary hyperlink to a place in the document, because when I save as PDF, it breaks the link. If I insert a cross reference, it works fine when I convert to PDF.

The table of contents only includes heading 1, and does not include the words "Table of Contents" as part of the table. I have manually inserted a bookmark named "TableofContents" at the top of the table. The text the bookmark displays is "Table of Contents" and it is to this point I need to link.
Reply With Quote