Greetings,
Sometimes when trying to tag a document, I receive an error mentioning the tagging is impossible due to partial selection of a hyperlink in the text. (which is not the case, I.e. I didn’t partially selected a hyperlink)
This happens while the cross-reference panel is empty. (but looking into story editor, I can see the cross reference hidden markers.)
My solution for the time being to this is either:
Going to story editor, and manually finding and removing these orphan cross-references.
Or using the following script to remove all the cross references and links:
var activeDocument = app.activeDocument;
app.activeDocument.hyperlinkTextDestinations.everyItem().remove();
app.activeDocument.hyperlinkTextSources.everyItem().remove();
app.activeDocument.hyperlinks.everyItem().remove();
Now, is there a more elegant way to find and remove these orphan cross references?
Also, in case of the answer being negative, is there a way to only select only cross references and not all the links in the code? Because this way I lose all my hyperlinks and bookmarks and I have to redefine them from scratch.
Thanks,
Kasra