1 Reply Latest reply on Jul 18, 2013 3:33 AM by csm_phil

    Getting ParagraphStyles in a text file

    Learner Learner

      Hi All,

       

      How to get all the paragraph style names in a text file.

       

      Thanks in advance

      Learner

        • 1. Re: Getting ParagraphStyles in a text file
          csm_phil Level 4

          Hi Learner,

           

          Please use the below JS code, its getting the paragraph styles only. If you need character styles also you can edit simply.

           

           

          var Report = new File("~/Desktop/Styles_Report.txt" );
          Report.open("w");
          var Styles = (app.activeDocument.allParagraphStyles);
          var i = Styles.length;
          while (i--){
              Report.writeln(Styles[i].name+"\n")
              }
          Report.close();
          

           

          thx,

          csm_phil