Skip to main content
Known Participant
March 17, 2008
Question

Removing footnote

  • March 17, 2008
  • 3 replies
  • 425 views
Hi,

I tried following code but the footnotes from indesign are not removed
and Iam getting error

var myDocument = app.activeDocument;
var ftcnt = 0;
for(var s=1; s<=myDocument.stories.count(); s++){
var st = myDocument.stories;
ftcnt = st.footnotes.count();
for(vat fn=1; fn <= ftcnt; fn++){
st.footnotes[fn].remove();
}
}
This topic has been closed for replies.

3 replies

Peter Kahrel
Community Expert
Community Expert
March 17, 2008
Ah, yes, that should be 0.
_soni_Author
Known Participant
March 17, 2008
Thanks, Peter on more simple question in the story count loop what shall be the start count 0 or 1
Peter Kahrel
Community Expert
Community Expert
March 17, 2008
You get two errors: one for the use of "vat" instead of "var", and when you fix that, you get an error because you need to remove the notes starting at the end of the document. Use

>for(var fn = ftcnt-1; fn >= 0; fn--)

Peter