2 Replies Latest reply on Jun 29, 2009 12:53 PM by Peter Kahrel

    how to create and apply Object Styles using javascript?

    R_Thangaraj Level 1

      hi all

      i need to create object styles with properties of "anchor Object Reference Point" and "anchor Positon Reference Point

      like

      actually i tried

      var myOStyle = app.activeDocument.ObjectStyles.add({name: "LeftAlign"});

      myOStyle.achorPoint = AnchorPoint.LEFT_CENTER.ANCHOR;

      myOStyle.anchoredPosition = AnchorPosition.anchored;

      myOStyle.horizontalReferencePoint = AnchoredRelativeTo.COLUMN_EDGE;
      myOStyle.anchorXoffset = spaceVal;
      myOStyle.verticalReferencePoint = VerticallyRelativeTo.lineBaseline;

      but it does not work.

       

      and i need code for apple Object style to object.

      pls..help me..

      pls send code