4 Replies Latest reply on Sep 9, 2009 3:42 PM by [Jongware]

    Help with "Paste in Place" on multi-page document..

    mcm_art Level 1

      We have a multi page document that I'd like to "Paste in Place" to a specified page (not "Spread")  I can't seem to find how to act upon a specific PAGE in the document.  ie: Paste in Place into page 5..  Along that line, I also need to be able to get margins, etc.. from said page for scripting the placement of the pasted item once it's placed.

       

      In other words, *IS* there any way to treat a selected page as if it were a simple single page document through scripting, and I would like it to update the display to show the selected page of the multi-page document to visually see that the paste operation was executed correctly.

       

      I'm scripting in VBScript, so pseudo code examples or VBScript would be prefered. 

        • 1. Re: Help with "Paste in Place" on multi-page document..
          Harbs. Level 6

          Use object.duplicate(yourPage)

           

          Harbs

          1 person found this helpful
          • 2. Re: Help with "Paste in Place" on multi-page document..
            mcm_art Level 1

            Let me clarify...

             

            1. I have a multi page document open (blank pages)

            2. I open a source (single page document) and select/copy what I need from it.

            3. I CLOSE the single page document, leaving only the multi-page document open

            4. This is where I need to do a Paste In Place to Page XX of the multi-page document and then Move the item if needed.

             

            I don't see how object.duplicate would work across multiple documents and don't want to have a "scratch page" to paste into, then do the move.

             

            Is there a way to paste-in-place the contents of the clipboard to page xx in the multi-page document?

            Then, how do I tell indesign to SHOW that 2 page layout to visually inspect the operation?

             

            (I know I'm making sound harder than it should be.. lol)

            • 3. Re: Help with "Paste in Place" on multi-page document..
              Harbs. Level 6

              I don't see how object.duplicate would work across multiple documents

               

              Did you try?

               

              Harbs

              • 4. Re: Help with "Paste in Place" on multi-page document..
                [Jongware] Most Valuable Participant
                .. Then, how do I tell indesign to SHOW that 2 page layout to visually inspect the operation?

                 

                A LayoutWindow is your view on the document (and yes, you can have more than one window for one document). Use

                 

                app.activeDocument.activeWindow.activePage = .. a page object reference ...

                 

                to set it. To view a "2 page layout" -- which is a Spread --, use

                 

                app.activeDocument.activeWindow.activeSpread = .. a spread object reference ...

                 

                [Add] -- it may also be useful to set one of

                app.activeDocument.zoom = ZoomOptions.FIT_PAGE;
                
                app.activeDocument.zoom = ZoomOptions.FIT_SPREAD;

                so you can see everything at a single glance.