Skip to main content
Participant
March 20, 2013
Answered

Please help. How to remove some of index reference?

  • March 20, 2013
  • 1 reply
  • 3304 views

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 has been closed for replies.
Correct answer Peter Kahrel

try {

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

} catch (_) {

}

1 reply

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
March 20, 2013

try {

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

} catch (_) {

}

Participant
March 20, 2013

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!