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

Removing footnote

New Here ,
Mar 17, 2008 Mar 17, 2008

Copy link to clipboard

Copied

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

Views

322

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Thanks, Peter on more simple question in the story count loop what shall be the start count 0 or 1

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST
Ah, yes, that should be 0.

Votes

Translate

Translate

Report

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