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

Remove All Notes Script

New Here ,
Jan 10, 2013 Jan 10, 2013

What would be the syntax for telling InDesign to remove all notes in a script (Type menu>Notes>Remove All Notes)? Need to add this command to my Globals script.

I currently use CSS4 through CSS5. Edit scripts in ExtendScript Tookit.

Thanks,

- Carlos F. Meneses

TOPICS
Scripting
1.7K
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

correct answers 1 Correct answer

LEGEND , Jan 10, 2013 Jan 10, 2013

To remove all notes in all stories, you'd do something like this:

app.activeDocument.stories.everyItem().notes.everyItem().remove();

If you have notes in footnotes or tables, you'd have to deal with those separately.

To simply invoke the menu, you can do this:

app.menuActions.itemByID(47896).invoke();

Harbs

Translate
LEGEND ,
Jan 10, 2013 Jan 10, 2013

To remove all notes in all stories, you'd do something like this:

app.activeDocument.stories.everyItem().notes.everyItem().remove();

If you have notes in footnotes or tables, you'd have to deal with those separately.

To simply invoke the menu, you can do this:

app.menuActions.itemByID(47896).invoke();

Harbs

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 ,
Jan 10, 2013 Jan 10, 2013

That's great Harbs. Thank you so much.

I was trying to invoke it by menue, but I like your alternative. Where may I find a good reference for all the menu IDs?

THANKS AGAIN!

- Carlos F. Meneses

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
LEGEND ,
Jan 10, 2013 Jan 10, 2013

Somewhere on the forum there's a function to build a list of all menu actions.

I usually just plug something like this into Script Bay:

app.menuActions.itemByName("Remove All Notes").id

The id is displayed in the status bar.

You can do something similar with an alert or $.writeln().

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 ,
Jan 17, 2013 Jan 17, 2013

Thanks again Harbs. You are a scholar and a gentleman!

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
Valorous Hero ,
Jan 20, 2013 Jan 20, 2013
LATEST

Where may I find a good reference for all the menu IDs?

How to open any menu item by script in InDesign

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