3 Replies Latest reply on Mar 29, 2017 3:08 PM by Christopher Pickering

    How to enable Text Frame Auto Size Option when scripting an Object Style

    Christopher Pickering



      I'm stuck when trying to enable autosize options when scripting an object style.


      I can change the settings inside of the option, but an unable to enable to option. Do you have ideas what line I'm missing?





      var myPlainTextObjectStyle = myDocument.objectStyles.add();
      myPlainTextObjectStyle.properties = {
        name: "Book Name Frame",
        enableTextFrameBaselineOptions: true,
        enableTextFrameGeneralOptions: true,
        enableAnchoredObjectOptions: true,
        enableFrameFittingOptions: true,
        enableTextFrameAutosizeOptions: true,
        enableParagraphStyle: true,
        enableStoryOptions: true,
        enableTextWrapAndOthers: true,
        enabledStroke: true,
        strokeWeight: 0,
        textFramePreferences : {   
            autoSizingType: AutoSizingTypeEnum.HEIGHT_ONLY,
        textWrapPreferences: {
        textWrapMode: TextWrapModes.JUMP_OBJECT_TEXT_WRAP


      Screen Shot 2017-03-29 at 5.35.08 AM.png