Hi guy
We planned to merge the document along with the Header and Footer into another document, but found that merging it could create a new section and merge the content of the Body. However, we found that neither the Header nor Footer in the source document were merged.
the code and the corresponding documents as below
Document main = new Document("c:\\temp\\bad\\ok_main.docx");
main.AppendDocument(sub, ImportFormatMode.KeepDifferentStyles, new ImportFormatOptions() { KeepSourceNumbering = true });
main.Save("c:\\temp\\bad\\ok_merged.docx");
ok_main.docx (173.9 KB)
ok_merged.docx (302.9 KB)
sub.docx (215.7 KB)
and below is the expected result
image.png (35.7 KB)