We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Joining two documents insert a section brake

I’m trying to join two documents.
There is always a section break inserted but I want the text of the appended document to continue just after the text of the destination document.
I have tried all sorts of code to append the document but just have no luck, always a section break is inserted.
appended is a little program with my code and the two documents.


Hi Thomas,

Thanks for your inquiry. In your case, we suggest you please move the cursor to the end of document and insert document (Endetext.doc) using DocumentBuilder.InsertDocument. Please check the following code example. Hope this helps you.

Dim Doc As Document
Dim EndeText As Document
Dim StartTextFilename As String = "Starttext.doc"
Dim EndTextFilename As String = "Endetext.doc"
Dim builder As DocumentBuilder
Doc = New Document(StartTextFilename)
builder = New DocumentBuilder(Doc)
'Endetext laden
EndeText = New Document(EndTextFilename)
builder.InsertDocument(EndeText, ImportFormatMode.KeepSourceFormatting)
EndeText = Nothing

Thanks for your help, works fine.