hai , here in the below coding the files are merged , but the resulting format is stored as "encoded text" , i need the format to be ".doc" or ".rtf" files
Dim mydirpath As String = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
Dim txtlist As String() = Directory.GetFiles(mydirpath, "*.doc")
Dim strfile As New StringBuilder
Dim txtname As String
For Each txtname In txtlist
Using sr As New StreamReader(txtname)
strfile.AppendLine(txtname.ToString())
strfile.Append(sr.ReadToEnd())
strfile.AppendLine()
End Using
Next
Using outfile As New StreamWriter(mydirpath + "\output.doc")
outfile.Write(strfile.ToString())
End Using