Does anyone know if it's possible for a script to find all instances of text in a named paragraph style and then link each instance to the corresponding entry in a modified TOC?
The workflow is for a 800-item catalogue created in CS4. At the moment, the title for each entry is set in a dedicated paragraph style; once all entries are signed off, I generate a TOC listing all the items. All very straightforward.
My client now wants an interactive PDF so that clicking on any item in the TOC will take him automatically to the relevant page in the catalogue. I want to avoid having to generate those hyperlinks manually… I know very little about scripting but I do know this is exactly the sort of thing that should be possible:
– find first instance of text in Para Style 1
– create hyperlink named with that text
– link this to corresponding text in Para Style 2
– repeat for all instances of text in Para Style 1.
But I also know that the hyperlink/cross-reference function can be a little counter-intuitive and I don't know whether I'm asking for the moon on a stick.
There's an excellent script* called LiveTOC which does exactly what you're asking for. It allows you to turn all your TOC entries into hyperlinks for PDF export.
Check it out: http://www.freelancebookdesign.com/scripts/live-toc
* which happens to have been written by me