I’m trying to append a document “open TO DO’s” to an existing document “report” and have the “open TO DO’s” document appear on a new page.
I’m building the “report” document by appending several other documents to the end of the document every time. However, I’d like the “open TO DO’s” document to appear on a new page.
I’m following this guide:
https://docs.aspose.com/words/net/insert-and-append-documents/
openTodosDt.TableName = "ToDo";
var openTodosSection = new Document("todo-section.docx");
openTodosSection.FirstSection.PageSetup.SectionStart = SectionStart.NewPage;
openTodosSection.MailMerge.Execute(new[] {"Header"}, new object[] {"All open TO DO’s"});
openTodosSection.MailMerge.ExecuteWithRegions(openTodosDt);
report.AppendDocument(openTodosSection, ImportFormatMode.KeepSourceFormatting);
Regardless is I use:
openTodosSection.FirstSection.PageSetup.SectionStart = SectionStart.NewPage;
or
openTodosSection.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
the open TO DO’s document is appended at the end of the report document (and not on a new document as I would like).
What am I doing wrong?