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.
|