Sub UniteFiles(Input_FullPath As String, Optional Output_FullPathAndFileName As String = "C:\Total.txt")
Dim fso As Scripting.FileSystemObject
Dim fldr As Folder
Dim fls As Files
Dim fl As File
Dim ts As TextStream
Dim t_fl As File
Dim t_ts As TextStream
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CreateTextFile Output_FullPathAndFileName, True
Set t_fl = fso.GetFile(Output_FullPathAndFileName)
Set t_ts = t_fl.OpenAsTextStream(2)
Set fldr = fso.GetFolder(Input_FullPath)
Set fls = fldr.Files
For Each fl In fls
If fl.Type = "Text Document" Then
Set ts = fl.OpenAsTextStream(1)
t_ts.Write ts.ReadAll
ts.Close
Set ts = Nothing
End If
Next
t_ts.Close
Set t_ts = Nothing
Set t_fl = Nothing
Set fls = Nothing
Set fldr = Nothing
Set fso = Nothing
End Sub