A Script to Collect All Objects With A Particular Object Style
In the course of my editorial duties here at InDesignSecrets, from time to time I’ll use the search feature to see what we’ve written on a particular topic. With almost 3500 posts and about 9000 forum discussions spanning 14 years, you never know what might turn up!
One recent find that I’m excited about is a script by the estimable Jongware for collecting all objects that are formatted with a particular object style and putting them on a new layer. It was originally written quite some time ago, but still works perfectly for me in InDesign 2020. I can imagine this script serving all kinds of uses in long documents, allowing you to show/hide sets of objects, make them non-printing, move them in front of or behind other content, or delete them altogether. And it also serves as a reminder of the necessity of using object styles in long document work. You can download the script here.
Before you run the script you need to open it in a text editor and enter the name of the object style and the name you want the new layer to have.