Object Styles within Object Style Groups cannot be set to Document.pageItemDefaults (Scripting)
See this thread in community forum: https://community.adobe.com/t5/indesign-discussions/script-cannot-set-an-object-style-as-a-default-frame-style-if-this-style-is-inside-a-folder/td-p/13062809
If an object style is within a group, it cannot be assigned as the appliedTextObjectStyle in Document.pageItemDefaults. Have not checked whether the same is true for appliedGraphicObjectStyle
-
Uwe Laubender commented
Hi Brian,
just tested with appliedGraphicObjectStyle.
All the same.With my German InDesign the error number is 30477, the message is:
"Ungültiger Wert für Einrichtung der Eigenschaft "appliedGraphicObjectStyle". ObjectStyle or String erwartet, aber ObjectStyle erhalten."
that translates to:
"Invalid value for set property '"appliedGraphicObjectStyle"'. Expected ObjectStyle or String, but received ObjectStyle"Regards,
Uwe Laubender
( Adobe Community Professional )