Posts for 01/2010

03 January 2010 - 13:59

Merge many word documents into one single document

This sounds like something fundamental, but for some reason I never really needed something to merge many word documents into one new document.
Till recently that is.

You can of course go the direction of the Master/Child documents approach in Outline view.
For more information on this you could try these links:

But if you really envisage one flat document, apparently you need a macro to do this properly - you'll need to finetune it with the specific path containing your Word documents as well as pay attention to the specific extensions the documents have :

Sub MergeDocs()
    Dim rng As Range
    Dim MainDoc As Document
    Dim strFile As String
    Const strFolder = "C:\Courses\Word\" 'change asper your need
    Set MainDoc = Documents.Add
    strFile = Dir$(strFolder & "*.doc") ' can change to *.docx or *.rtf
    Do Until strFile = ""
        Set rng = MainDoc.Range
        rng.Collapse wdCollapseEnd
        rng.InsertFile strFolder & strFile
        strFile = Dir$()
    Loop
End Sub
(0) Comments ·
Page 1 of 1 pages