This content has been marked as final. Show 3 replies
There's an undocumented method:
in CS2. Ah, I lie. It was undocumented at CS2 time, but now it is documented in the CS4 object model viewer which lets you see the CS2 object model. Here's the skinny (I pulled it from the Rectangle description, but it can be used with any object that takes and object style):
Rectangle.applyObjectStyle (using: ObjectStyle , clearingOverrides: Boolean , clearingOverridesThroughRootObjectStyle: Boolean )
Applies the specified object style.
using: Data Type: ObjectStyle
The object style to apply.
clearingOverrides (optional): Data Type: Boolean , Default Value: true
If true, clears the Rectangle's existing attributes before applying the style. (Optional)
clearingOverridesThroughRootObjectStyle (optional): Data Type: Boolean , Default Value: false
If true, clears attributes and formatting applied to the Rectangle that are not defined in the object style. (Optional)
Thanks for the speedy response. Will this work for anchored objects? Or is there some other stuff that I'm forgetting to do?
I don't see why it wouldn't work.
Be sure to provide the object style as the parameter and not just its name.