5 Replies Latest reply on Jul 20, 2011 12:38 PM by SuperMacGuy

    [AS] Duplicate page to other document

    SuperMacGuy Level 2

      I need to duplicate a page from one document into another (Applescript, CS5). I can do it, but the new page always is placed next to the last page, attached on the same spread (like a gatefold). But I don't want it to be attached like that, it would be easier if it could create a new spread on its own (which is the way it seems to work when done by hand). Using "after spread -1" doesn't do anything different than "after page -1".

       

      duplicate every page of otherDoc to after page -1 of doc1

        • 1. Re: [AS] Duplicate page to other document
          OlivierBerquin

          Did you try to change the « allow page shuffle » of the document preference (or something like that)?

           

           

          allow page shuffleget/setbooleanIf true, guarantees that when pages are added to a spread it will contain a maximum of two pages. If false, allows pages to be added or moved into existing spreads. For override information, see preserve layout when shuffling.

           

          Oli.

          • 2. Re: [AS] Duplicate page to other document
            SuperMacGuy Level 2

            Yes I tried changing that, but it didn't make a difference.

            • 3. Re: [AS] Duplicate page to other document
              OlivierBerquin Level 1

              Did you test to copy « spread » instead of « page »?

               

              Something like this:

               

                   duplicate spread 1 of SourceDoc to after spread -1 of TargetDoc

              HTH.
              Oli.
              • 4. Re: [AS] Duplicate page to other document
                Muppet Mark Level 5

                From one doc of single page spreads to another…

                 

                 

                tell application "Adobe InDesign CS5"

                     set docA to the active document

                     set docB to the last document

                     -- To end of single page spreads

                     duplicate last page of docA to ¬

                     after last page of docB

                end tell

                 

                 

                From a single page doc to one with spreads left page…

                 

                 

                tell application "Adobe InDesign CS5"

                     set docA to the active document

                     set docB to the last document

                     -- To first page of new spread

                     duplicate last page of docA to beginning of ¬

                     (make new spread at end of docB)

                end tell

                 

                 

                From a single page doc to one with spreads right page…

                 

                 

                tell application "Adobe InDesign CS5"

                     set docA to the active document

                     set docB to the last document

                     -- To last page of new spread

                     duplicate last page of docA to end of ¬

                     (make new spread at end of docB)

                end tell

                 

                Oh I see you mention every…

                 

                tell application "Adobe InDesign CS5"

                     set docA to the active document

                     set docB to the last document

                     -- All spreads to end

                     duplicate every spread of docA to ¬

                     after last spread of docB

                end tell

                1 person found this helpful
                • 5. Re: [AS] Duplicate page to other document
                  SuperMacGuy Level 2

                  Thanks Mark, that worked. I don't think it was much different than I was using. I also toggled the "allow pages to shuffle" option. I think before that I was toggling it on the destination document, but it also needed to be turned on the originating doc.