I’m using this code to insert a DOCX at the end of another DOCX:
string strSummary = @"…\Docs\Summary\MergeTest.docx";
string strInsert = @"…\Docs\Agreements\Incubation Kit A.docx";
Aspose.Words.Document mainDoc = new Aspose.Words.Document(strSummary);
Aspose.Words.Document subDoc = new Aspose.Words.Document(strInsert);
Aspose.Words.Paragraph para = new Aspose.Words.Paragraph(mainDoc);
Aspose.Words.Run run = new Aspose.Words.Run(mainDoc);
para.Runs.Add(run);
mainDoc.LastSection.Body.AppendChild(para);
InsertDocument(para, subDoc);
mainDoc.Save(strSummary);
This finishes without error but the sub doc is not inserted at the but but it has overwritten somehow the first document. It looks like the sub doc is on a layer on top of the first document. Any ideas how I can only add the sub doc at the end of the first doc?