Hi,
I merged rtf files using the code below in vb.net desktop application.
After it has merged, it does not retain its original format. i.e. the line space is widened.
Try
Dim allRTFDocument As String() = System.IO.Directory.GetFiles(Application.StartupPath & ("\Data2\" & txtLangCode.Text & ""), "*.rtf")
Dim characters As String() = New String() {"A", "B", "CH", "D", "E", "Ẹ", "F", "G", "GB", "GH", "GW", "H", _
"I", "Ị", "J", "K", "KP", "KW", "L", "M", "N", "NW", "NY", "Ṇ", _
"O", "Ọ", "P", "S", "Ṣ", "T", "U", "Ụ", "V", "W", "Y", "Z", "Ẓ"}
Dim files As List(Of String) = New List(Of String)()
For Each character As String In characters
Dim chars As String = character.ToLower()
Dim matchFiles As String() = Array.FindAll(allRTFDocument, Function(c) System.IO.Path.GetFileName(c).ToLower().StartsWith(chars))
For i As Integer = 0 To matchFiles.Length - 1
files.Add(matchFiles(i))
Next
Next
Merge(files.ToArray(), My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\Dictionary.docx", True, "")
Catch ex As Exception
MsgBox("No data to export", MsgBoxStyle.Information)
End Try
In this case, what do I do?