1 Reply Latest reply on Jan 21, 2015 8:25 AM by Loic.Aigon

    function question

    creativejoan0425 Level 1

      var myParagraphStyle = null;

      var myTable = null;

            

      my1();

       

          function my1(){

                 myParagraphStyle = app.activeDocument.paragraphStyles.item("50 Table_txt");

                 return myParagraphStyle;

                

                    my2();

                    myTable.columns[0].width = 40;

                  }

             

      function my2(){

          alert(myParagraphStyle);

             app.selection[0].appliedParagraphStyle = myParagraphStyle;

              app.selection[0].clearOverrides(OverrideType.ALL);

              myTable = app.selection[0].convertToTable("\t","\r");

              return myTable;

      }

       

      why doesnt work?

        • 1. Re: function question
          Loic.Aigon Adobe Community Professional

          Hi,

           

          I usually am very kind and thoughtful as I wish everyone would be with me but :

           

          1) Start welcoming people and thank them for their help is appreciated and cost less. Also introduce you is fine.

          2) Being clear on what you try to achieve an what you get as result help people understanding your issue

          3) Obviously your "issue" comes from the instruction "return" which ends the function code execution at this point. So no further code is executed.

           

          Hope that helps,

           

          Loic