4 Replies Latest reply on Jan 18, 2013 10:21 AM by matthew.wimer

    Change Paragraph Style after Page Break

    matthew.wimer

      I am completely new to scripting, so I'm taking what I've found from others and attempting to modify it.

       

      What I'm trying to do is change a paragraph style that follows a page break symbol.  I've got a script (below) that will change a paragraph style following an already predetermined paragraph style, so I'm assuming it's similarly done?

      Thanks!

                                                                                     

      Changes paragraph after "heading A" to "body text":

       

      app.findTextPreferences = null;

      app.findTextPreferences.appliedParagraphStyle = "heading A";

      var myResults = app.activeDocument.findText();

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

      myResults[i].parentStory.paragraphs.nextItem(myResults[i].paragraphs[0]).appliedParagraphS tyle = "body text";