1 Reply Latest reply on Oct 8, 2012 6:14 AM by Jump_Over

    [JS] [CS5] Possible to change "Paragraph Spacing Limit" with a Script




      right now I'm writing a simple script which formats some text. For this formatting I need the vertical Justification "Justify" with a "Paragraph Spacing Limit" but I can't find something helpful.


      Does anyone know how to set the limit to a specific value?


      Thanks in advance, Statixx



      Here's my not yet finished Script



      Edit: script edited, had a few major mistakes


      #target InDesign


      var myDocument = app.activeDocument;

      var mySelection = myDocument.selection[0];

      var myParagraphLength = app.selection[0].paragraphs.length;

      var myParagraph = app.selection[0].paragraphs;

      var myTest


      mySelection.visibleBounds = [0,0,30,90];



      mySelection.textFramePreferences.insetSpacing = [3,3,1.5,3];

      mySelection.textFramePreferences.verticalJustification = VerticalJustification.JUSTIFY_ALIGN;




      if ( myParagraphLength == 3) {

             var myPara0 = myParagraph[0].contents;

             var myPara1 = myParagraph[1].contents;

             var myPara2 = myParagraph[2].contents;


              myParagraph[0].pointSize = "13pt";

              myParagraph[0].leading = "13pt";

              myParagraph[0]. fontStyle= "Bold";


              myParagraph[1].pointSize = "10pt";

              myParagraph[1].leading = "10pt";

              myParagraph[1].leftIndent= "10";


              myParagraph[2].pointSize = "10pt";

              myParagraph[2].leading = "10pt";

              myParagraph[2].fontStyle= "Bold";

              myParagraph[2].leftIndent= "10";