I ran into the following known bug/difficulty recently, when laying out a graphic-rich book in InDesign.
The book had many photos with captions, and I had grouped the photos and the captions together.
But now, after the photos and captions were grouped, I wanted to apply an object style to the group only – the group needed some text wrap, and since there were many such groups in the book, the correct way to do this was to create and apply an object style to each group.
This is where the trouble started.
When you apply an object style to a group of objects in InDesign, that object style is applied to all elements inside the group.
So, if, as in my case, the object style applied 20pt of text wrap below the group, each element inside the group will also have 20pt of text wrap applied below.
In my case, this meant that the picture above the caption was pushing the text of the caption away and causing it to go into overset!
Clearly not desirable.
(For more discussion of this problem, check out this thread from 2008 (!) on InDesignSecrets.com.)
The Solution (A Script!)
The only solution I could come up with was the following script.
Apply Object Style to Group Silently (snappy name, I know!) will let you apply an object style to a group without changing any element inside that group.
So you can apply a style to the group, and it will be applied only to the group itself and not to anything inside the group.
Seems a bit crazy that Adobe expects us to resort to a script for such an obvious need! But at least with this script, imperfect as it is, there is a partial solution.
How to Use the Script
After downloading and adding it to your scripts folder as usual, select a group in InDesign and run the script.
Select the object style you would like to apply to that group.
Click OK, and the style will be applied only to the group. Nothing else should change!
P.S. This is a free script, and it has not been thoroughly tested. I’ve been using it myself on a real-world project and it seems to work fine in many cases. Sometimes, the properties of some things inside the group change unwantedly.
USE WITH CARE!
TIP: For the most predictable results, make sure that all the items in the group have an object style applied, and that none of the object styles have local overrides.
Have fun – and do please post below if you find any issues with the script or have any comments!
OlegJuly 26, 2017 9:42 am
Thank you for script. Unfortunately there is one bug.
My data are: Windows 7 professional, InDesign CS6 (8.0.1). First object–rectangle with Object Style 1, second object–text frame filled by text with Object Style 2; there are no local overrides; objects grouped together. After applying Object Style 3 to group second object (text frame) shrinks on 1 pixel in width and height relatively frame center (and text overflow).
ArielJuly 28, 2017 1:41 am
It sounds like one of the objects has auto-resizing on. Of course, that shouldn’t really be a problem, but the thing is the script takes a shortcut in restoring the properties of the objects inside the group, and that shortcut doesn’t work for everything.
LukasMarch 24, 2020 10:26 am
Did not work in my initial test, is it OK if I try to modify it? I’ll let you know if I get success. First I’m on 2020 version, then also my objects in group were redistributed in some random ways, I was hoping they would retain their initials and specific object styles, which may be the intent but was not happening.