Skip to main content
Participant
Mar 20, 2013 12:27 PM UTC
Answered

Please help. How to remove some of index reference?

Sometimes I need to use an old indesign document to make another book. It is easy and fast. You do not need to define footnotes, running headers, master pages etc. 

I always have the problem with books that had index inside.

It is easy to remove an old text from the document and fill in a new text.

But if an old document had index, such reference like "see" "see also" etc. still remains unremoved (undeleted). 

The are stil listed in the index palette. 

And I don't know how can I remove them automatically from my old document before I import a new text to it.

Probably someone of you can write such simple script which can remove all index reference (or particularly such as "see" and see also") from the empty InDesign document.

I mean empty indesign document that is document without body text inside.

Thank you in advance for your help and sorry for my poor English.

This topic is closed to new replies. Start a new post to keep the conversation going.
Peter Kahrel
Peter KahrelCorrect answer
Community Expert
Mar 20, 2013 5:09 PM UTC

try {

    app.activeDocument.indexes[0].topics.everyItem().remove();

} catch (_) {

}

14 replies

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
Mar 20, 2013 5:09 PM UTC

try {

    app.activeDocument.indexes[0].topics.everyItem().remove();

} catch (_) {

}

Translate
Participant
Mar 20, 2013 6:06 PM UTC

Thank you very much Peter, it is works.
And thank you for all your scripts which help me a lot in my everyday work.

Best regards!

Translate