Hi,
Hi Meet,
Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you perform the same scenario using MS Word, you will get the same output. Please insert section break (new page) at the end of Object 1.docx and copy contents of Object 2.docx into Object 1.docx. You will get the same output.
Please let us know if you have any more queries.
Hi thanks for investigating this more. I tried same thing on my machine and I am not able to replicate the issue in office word 2010.
Hi Meet,
Thanks for your inquiry. We have inserted the contents of Object 2.docx into Object 1.docx using MS Word 2010 and have noticed the same paragraph formatting. We have attached the output document with this post for your kind reference.
Document mainDocument = new Document(MyDir + “Object 1.docx”);<o:p></o:p>
Document pieceDocument = new Document(MyDir + "Object 2.docx");
mainDocument.LastSection.Body.AppendParagraph("");
var importedSection = ImportSections3(pieceDocument, mainDocument);
mainDocument.Sections.Add(importedSection[0]);
mainDocument.Save(MyDir + "output.docx");