A family of Microsoft word processing software products for creating web, email, and print documents.
For a macro to automate the process, whilst accommodating potential differences in Styles and page layouts, etc. see:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a list of 25 word documents - how do I merge these into a single document ?
A family of Microsoft word processing software products for creating web, email, and print documents.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
For a macro to automate the process, whilst accommodating potential differences in Styles and page layouts, etc. see:
Hi Niels,
We have noticed that you have not replied to our last response. We would like to know if the issue you have raised to us is still on-going. If yes, please reply to the thread so we can continue troubleshooting your concern.
Thank you.
Regards,
Chan G
Microsoft Community Moderator
Hi Chan G
There seems to be at least one error in your suggested VBA code,
When putting VBA or other code into the forum, please remember to change the format from Standard to Code Block using the toolbar above your message.
A better way to distribute VBA code is to make a sample document and distribute that:
Why a sample file is important for troubleshooting - - - - - - - and how to do it.
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more
Hi Niels,
Thank you for using Microsoft products and making community posts.
I understands the importance of resolving this issue, Don’t worry I will be helping you with this following steps.
Method 1: Using Insert > Text from File
This method allows you to merge multiple documents into one without copying and pasting manually.
Method 2: Manually Copy & Paste (Quick for Small Documents)
If your documents contain different formatting or styles, it might be best to manually copy & paste to ensure consistency.
You can also try these more advance steps below:
Method 3: Using VBA (Automated for Many Documents)
If you have 25+ files, manually inserting each one can be tedious. Using VBA code in Word can automate the process:
vbaSub MergeDocuments() Dim mainDoc As Document Dim fileDialog As FileDialog Dim fileName As String Dim i As Integer
Set mainDoc = ActiveDocument
Set fileDialog = Application.FileDialog(msoFileDialogFilePicker)
With fileDialog
.AllowMultiSelect = True
.Filters.Add "Word Documents", "\*.docx"
If .Show = -1 Then
For i = 1 To .SelectedItems.Count
fileName = .SelectedItems(i)
mainDoc.Range.InsertFile fileName
Next i
End If
End With
End Sub
Please feel free to let me know how it goes.
Chan G
Microsoft Community Moderator