1 Reply Latest reply on Sep 6, 2014 6:25 AM by pixxxel schubser

    First Line Indent Null

    Murali_Vetha Level 1

      Hi,

       

      I need to null value in the Paragraph Style "First Line Indent". See the below my coding

      --------------

      var pstyle = app.documents.item(0).paragraphStyles.everyItem().getElements();

       

      for (i=0; i<pstyle.length; i++)

       

      if (pstyle[i].appliedParagraphStyle == "04 Space Break FL")

      {

          pstyle[i].firstLineIndent = null;

      }

      --------------

       

      If now my 04 Space Break FL tag having First Line Indent is 1p, but I need to null the value.

       

      By

      Vetha

        • 1. Re: First Line Indent Null
          pixxxel schubser Level 5

          Hi @Murali_Vetha,

          there are two mistakes in your code.

           

          • You have to compare the name of the style.
          • Null is not a value

           

          Try this:

          var pstyle = app.documents.item(0).paragraphStyles.everyItem().getElements();
          for (i=0; i<pstyle.length; i++) {
              if (pstyle[i].name == "04 Space Break FL") {
                  pstyle[i].firstLineIndent = 0;
                  }
              }
          

           

          Have fun