2 Replies Latest reply on Sep 6, 2011 6:48 PM by dylw

    CS5 Applescript to make new page at current spread

    dylw Level 1

      Here is the situation:

      I have a template InDesign Document that has facing pages turned on and allow document pages to shuffle turned off. There is a Master Page in it with page items on both the left and right sides of the spread. There is only one page in the template InDesign Document (The right hand page).

       

      What I want to do:

      I want to insert 1 new page into the document using Applescript

      I want the page to be the left hand page joined to the existing right hand page.

       

      What I have tried:

      tell application "Adobe InDesign CS5"

           set mySpread to the parent of page 1 of active document

           tell the active document

                make page at before page 1 with properties {applied master:master spread "A-Master", allow page shuffle:false, parent:mySpread}

           end tell

      end tell

       

      What is happening:

      The script is giving me a new spread with only 1 page (another right hand page)

       

      So, does anyone know the Applescript to either join these pages together after the new page is created, or the Applescript to get the new page to place on the same spread as a left hand page joined to the existing right hand page?

        • 1. Re: CS5 Applescript to make new page at current spread
          OlivierBerquin

          Hi dylw,

           

          Have you tried to do this in Indesign?
          You must follow exactly the same way.

          I think there will be a worry for the allocation of master page between right and left page.

           

          HTH.

           

          Oli.

          1 person found this helpful
          • 2. Re: CS5 Applescript to make new page at current spread
            dylw Level 1

            Hi Oli,

             

            Thanks for the reply. When you break it down, simply inserting a page in InDesign doesn't work. The method I am trying to achieve in InDesign is the equivalent of dragging the left hand master page and placing besides the active right hand page. So with that information on board, what I needed to do is insert the new page then move it which I have discovered:

             

             

            tell application "Adobe InDesign CS5"

                 tell the active document

                      move page 2 to before page 1 binding left align

                 end tell

            end tell

             

             

            With your help I have answered my own question. Thanks!

             

            Cheers

             

            DylW