Copy link to clipboard
Copied
I have an InDesign document that I am working with in CC 2014. It was originally converted from either Frame Maker (2007) or InDesign CS5 and seems to have some old cross-reference markers that are now estentially empty junk. The problem is that these don't show up in the cross-references or hyperlinks panel and so far I have now found a way to search for them - either through InDesign or with a script so I can delete them. They do read enough though to be able to mess up other scripts that I run that use the character count of the paragraph. Any ideas on how I can find and delete these without having to go one by one?
Copy link to clipboard
Copied
Hi @KB_book dsn, can you please share an .indd document that has some of these empty cross reference markers?
Also, it might be good to know if there are also some valid cross-reference markers in the document (ie. that do appear in the cross-references panel).
- Mark
Copy link to clipboard
Copied
Hi Mark, Thank you very much for your fast reply. I can upload a sample file in the morning but meanwhile I wanted to answer you with more data. I user several scripts that utilizes InDesign's hyperlink desinition feature to embed a page number link - It basically creates the same thing as a cross-reference but without the massive lags that sometimes follow and allows other information to be generated from the link such as bibligraphies, glossaries, etc. So I have valid hyperlink destinations in my file that show up in the hyperlink desintations options part of the cross-references panel but not in the cross-references panel itself. The empty hyperlinks desintations don't show up in any panels and so far I have not been able to find them with a script either.
Copy link to clipboard
Copied
No worries, it will be good to see the sample document. Are you a scripter? Have a look at any of the "hyperlink" properties of Document, eg. Document.HyperlinkPageDestinations.
Copy link to clipboard
Copied
If you work on a PC you could use free version of my ID-Tasker tool to see all Hyperlinks, Cross-References, sources and destinations.
Copy link to clipboard
Copied
To show the number of HyperLinks and HyperLinkSources:
var curDoc = app.activeDocument;
var countHyperlinkTextDestinations = curDoc.hyperlinkTextDestinations.length;
var countHyperlinkTextSources = curDoc.hyperlinkTextSources.length;
alert(„Report Hyperlinks“ + „\r“ + „\r“ +
„TextHyperlinkDestinations: „ + countHyperlinkTextDestinations + „\r“ +
„TextHyperlinkSources: „ + countHyperlinkTextSources );
var curDoc = app.activeDocument;
var countHyperlinkTextDestinations = curDoc.hyperlinkTextDestinations.length;
var countHyperlinkTextSources = curDoc.hyperlinkTextSources.length;
curDoc.hyperlinkTextDestinations.everyItem().remove();
curDoc.hyperlinkTextSources.everyItem().remove();
alert(„RemoveHyperlinks“ + „\r“ +
„Removed „ + countHyperlinkTextDestinations + „ TextHyperlinkDestinations\r“ +
„Removed „ + countHyperlinkTextSources + „ TextHyperlinkSources\r“ );