How do I place two documents on top of each other

I have two documents, both are multiple pages, the exact number of pages.  I want to place one exactly on top of the other without making the final document twice the number of pages.  When I do "import" and click the upside down "L" shape, it places the first page right where I need it to on page one, but then it places the other pages in their own blank sheet, when I need them to be placed on top of the next subsequent page.

If I'm not clear for example, I want page 1 of document 1 and page 1 of document 2 to become one piece.  Since this document is many pages (87).  I don't want to have to copy/paste 87 times, and I have to do this several times at that for several documents.

Parents
No Data
Reply
  • I haven't tried this before, but I stumbled through a macro that seems to work for me on X7, at least for my testing using a couple of simple documents:

    Sub copy_paste_all_multiple_pages()
    Dim doc_source As Document
    Dim doc_target As Document
    Dim page_index As Long
    Dim paste_layer As Layer

    Set doc_source = OpenDocument("d:\test_B.cdr")
    Set doc_target = OpenDocument("d:\test_A.cdr")

    Application.Optimization = True

    For page_index = 1 To doc_source.Pages.Count

        doc_source.Pages.Item(page_index).Shapes.All.Copy
        Set paste_layer = doc_target.Pages.Item(page_index).CreateLayer("Paste Layer")
        paste_layer.Paste

    Next page_index

    Application.Optimization = False
    Application.Refresh

    End Sub

    That walks through the pages in order. For each page, it copies from the "source" document, then creates a new layer on the corresponding page of the "target" document and pastes the copied content there.

    I didn't include any user interface for selecting the documents, and it's not checking to see if the page count is the same for the two documents.

    No guarantees here. Don't try it on anything that you don't have safe copies of!

Children