Scripting: How to copy ObjectStyle to another document?
Hi,
I try to copy an ObjectStyle from one document to another, I didn't find a "copy" method so I tried to duplicate and move the style.
This is my code:
var destDoc = app.open( "destination.indd" );
var sourceDoc = app.open( "source.indd" );
var ObjectStyleName = "MyStyle";
var sourceStyle = sourceDoc.objectStyles.itemByName( ObjectStyleName );
var destStyle = sourceStyle.duplicate();
destStyle.move( LocationOptions.AT_END , destDoc );
But the style is not moved to the destination - what's wrong here?
Thanks for any tipps
Klaus
