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

Free Support Forum - aspose.com

Template merging footer issue

Hello Aspose,

I am merging two word template documents.
First template has footers present, and i am using a page break before appending the second template, page break is coming but footer should not be present in the blank page that is created using page break.
In the example i am using there are 6 pages in a template and after adding a page break then the blank page should not have footer as “7”
Can you please let me know how to proceed with this.


Thanks for your inquiry. Please use the following code example to get the desired output. Hope this helps you.

Document dstDoc = new Document(@"test1.dotx");
dstDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
DocumentBuilder builder = new DocumentBuilder(dstDoc);


Document srcDoc = new Document(@"test2.dotx");

dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);

foreach (Section section in dstDoc.Sections)
    section.PageSetup.RestartPageNumbering = false;