7 Replies Latest reply on Apr 18, 2008 8:03 AM by (Lisa_Spike)

    [JS] CS2: Search on a master page

      (I'm still on CS2)

      I have an auto page number on my master spreads. They're facing pages, so I have a left master page and a right master page. I want to find those two auto page numbers and apply a paragraph style to the one on the left page, and another style to the one on the right page.

      My problem is using "search" for master spreads. If it were a "normal" page, I know I could do something like:

      app.changePreferences.appliedParagraphStyle = 'Page Number R'
      app.activeDocument.pages[0].search ("^#", false, false, "^#")

      And it works. But for master spreads, I'm having difficulty using the search method. I've tried

      app.activeDocument.masterSpreads('A-Master').pages(1).search ("^#", false, false, "^#")

      and

      app.activeDocument.masterSpreads[0].pages[1].search ("^#", false, false, "^#")

      as well as a few other similar combinations. Obviously I'm missing something here. How do I search master page left and master page right?

      Thanks,

      Lisa