Aspose.Word InsertDocument not retain file page format

Use the Api DocumentBuilder.InsertDocument(Document srcDoc, ImportFormatMode importFormatMode) to insert file into the other file , but the page format changed, from Horizontal page to
Vertical page

Here is my demo
GuxhTestNew-3.zip (7.7 MB)

@gxhllj You have encountered the expected behavior of Aspose.Words. If you insert a document using MS Word you will get the same result.
If you need to retain sections as in the source document, you can consider using AppendDocument method instead of InsertDocument.

But I want to insert file into the location of the bookmark and retain sections as in the source documen

@gxhllj In this case you can insert a section break at the bookmark position and then insert sections from the source document. For example see the following code:

Document dst = new Document(@"C:\Temp\dst.docx");
DocumentBuilder builder = new DocumentBuilder(dst);
Document src = new Document(@"C:\Temp\src.docx");
builder.MoveToBookmark("TESTBOOKMARK", false, true);
builder.InsertBreak(BreakType.SectionBreakNewPage);
foreach (Section srcSect in src.Sections)
{
    builder.CurrentSection.ParentNode.InsertBefore(dst.ImportNode(srcSect, true, ImportFormatMode.KeepDifferentStyles), builder.CurrentSection);
}
dst.Save(@"C:\Temp\out.docx");