Disappearing pagebreaks

Hi,





Our pagebreaks are disappearing when merging a document with the mailmerge option remove empty paragraphs enabled.

I’ve attached an example project to show you the exact problem.



Thanks in advance for looking into this.





Kind regards,



Kris

Hi Kris,

Thanks for your inquiry. When the MailMerge.RemoveEmptyParagraphs property is set to true any paragraphs which are empty or only contain TableStart or TableEnd merge fields are removed automatically during mail merge. In this situation if you are applying the techniques to such a paragraph then this will cause incorrect behavior as the paragraphs containing page breaks will be removed during mail merge.

I suggest you please read following documentation link for detail:
http://www.aspose.com/docs/display/wordsnet/How+to++Control+New+Pages+during+Mail+Merge

You can overcome this issue (page break delete issue) by changing your template. You can use one of the following approach to overcome this issue.

  • Insert section break (next page) instead of page break in your template document
  • Insert an extra paragraph after page break in your template document

Hope this helps you. Please let us know if you have any more queries.