Hi Guys..
hope u all are well...
Sometime we have thousands of Ms Word documents having lot of pages, all are in one Folder / Directory and we need to merge them all in one single document, wonder how...........is that Magic let's start this little trick.
Open Ms Word and press Alt + F11 to invoke VBA editor, double click on this document, and paste the below code.
Sub MergeDocs()
Dim rng As Range
Dim MainDoc As Document
Dim strFile As String
Const strFolder = "C:\My Word Documents\" 'change to the folder path
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
close the VBA editor save the file as Magic or whatever you wana name it.
now place this file inside the folder / directory where your all documents are located.
open magic file and press Alt + F8 to run the macro select MergeDocs and click on Run button.
now it will merge all the documents into one.........wow......
if you like this then write few lines ...........or atleast say thanks..
Bookmarks