Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Removing footnote

New Here ,
Mar 17, 2008 Mar 17, 2008
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();
}
}
TOPICS
Scripting
421
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2008 Mar 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 17, 2008 Mar 17, 2008
Thanks, Peter on more simple question in the story count loop what shall be the start count 0 or 1
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 17, 2008 Mar 17, 2008
LATEST
Ah, yes, that should be 0.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines