Copy link to clipboard
Copied
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
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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().
Copy link to clipboard
Copied
Thanks again Harbs. You are a scholar and a gentleman!
Copy link to clipboard
Copied
Where may I find a good reference for all the menu IDs?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more