Return to Snippet

Revision: 18472
at September 30, 2009 13:15 by bblnrlz


Initial Code
Sub MergeDocs()
    Dim rng As Range
    Dim MainDoc As Document
    Dim strFile As String
    Const strFolder = "C:\Book\Chapters\" 'change to suit
    Set MainDoc = Documents.Add
    strFile = Dir$(strFolder & "*.doc") ' can change to .docx 
    Do Until strFile = ""
        Set rng = MainDoc.Range
        rng.Collapse wdCollapseEnd
        rng.InsertFile strFolder & strFile
        strFile = Dir$()
    Loop
End Sub

Initial URL
http://www.gaebler.com/How-to-Combine-Multiple-Word-Documents-into-One-Document.htm

Initial Description


Initial Title
How to Combine Multiple Word Documents into One Document

Initial Tags


Initial Language
Visual Basic