Add pages of 1 DOC to another?

I need to add all the pages of all open documents to a new document.

Is there a macro available to do that?

If not,  any suggestion of where to start?

Parents
No Data
Reply
  • Here is something to get you started:

    It will have a blank first page and there is no control of the order the documents, it just loops through them.

    Sub OpenDocToNewDoc()
        Dim d As Document, dNew As Document
        Dim impopt As StructImportOptions
        Dim p As Page
        
        Set impopt = CreateStructImportOptions
        Set dNew = CreateDocument()
        
        'This is needed so that everything is not imported on a single page
        impopt.MaintainLayers = True
        
        For Each d In Application.Documents
            If d <> dNew Then
                Set p = dNew.InsertPages(1, False, dNew.Pages.Last.Index)
                ActiveLayer.ImportEx(d.FullFileName, cdrCDR, impopt).Finish
            End If
        Next d
    End Sub
    

    Happy Coding, 

    -Shelby

Children