3 Replies Latest reply on Nov 15, 2014 6:58 AM by Sajeev Sridharan

    How can I replace ParagraphStyle

    Murali_Vetha Level 1

      Hi All,

       

      I need to one of the paragraph style remove and replace another paragraph style. See below coding. Please advice.

       

       

      var mydoc = app.activeDocument;
      
      
      var mypstyle = mydoc.paragraphStyles.everyItem().getElements();
      
      
      for (i=0; i<mypstyle.length; i++)
      {
          if (mypstyle[i].name == "Text")
          {
              mypstyle[i].name = remove({replacingWith: "Paragraph Style 3"});
           }
       }
      
      
      
      
      alert("Done")    
      aler
      
      
      art("Done")    alert("Done")    
      

       

      Regards,

      Muralidharan.j