Hi,
Here is the simple macro I have recorded in Word.
It creats a backup.doc file after inserting the contents of all the .doc files saved in My Documents. It is working fine.
BUT
I want to include the sub-directories in my documents as well.
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 04/06/02 by shantanu
Dim MyFile, MyDir
MyDir = "C:\My Documents\"
Documents.Add DocumentType:=wdNewBlankDocument
ChangeFileOpenDirectory MyDir
MyFile = Dir(MyDir & "*.doc"
While MyFile <> ""
Selection.InsertFile FileName:=MyFile
'Selection.InsertFile FileName:="doc4.doc"
MyFile = Dir
Wend
ActiveDocument.SaveAs FileName:="backup.doc"
End Sub
Thanks
Shantanu Oak
shantanuoak.com