Merging for printing labels results in empty last page

I searched a lot in the forums and in the support pages, but I did not find an answer to my question yet. There are some suggestions to try, but nothing results in what I want. So hence I add a new post here, hopefully you can help me.



I am using Aspose.Words (.Net) for mail merges. One of the things I need to do is creating address labels. When merging, I want each address on its own page (label). So I created a template with basically the following structure:

[TableStart:Customer][some fields][Page break][TableEnd:Customer].



I added the page break to make sure that each record (address) ends up on a new page (label).



But as a result, the last page is an empty label. This is of course according to what we can expect, regarding my template.



How can I accomplish that each record ends up at its own page without having a last empty page?



I tried the suggestions mentioned in https://docs.aspose.com/words/net/mail-merge-and-reporting/ :



* “Select Section / Start from new page”: has no effect, because my merged document contains only one section and not a separate section per repeated record

* “Format the first paragraph in the region to have a page break before it using Format / Paragraph / Line and Page Breaks”: has no effect, because my TableStart is in the same first paragraph and I do not want to introduce a paragraph break there

* “Insert a page break using Insert / Break in Microsoft Word at the end of the mail merge region”: this is what I am currently doing, but has not the desired end result



Below is my full template text (translated to English for convenience)



«TableStart:Customer»«FullNameInAddress»

«Street» «Number»

«Postal code» «City»----------Page break-----------

«TableEnd:Customer»





Attached are my template: Label sjabloon 89x36.docx

and my merged document: VivaAdreslabel Label sjabloon 89x36 Out.docx



Hopefully you can help me…

Hi there,

Thanks for your inquiry. Please read the section ‘Controlling New Pages when Using Mail Merge with Regions’ from here:
http://www.aspose.com/docs/display/wordsnet/How+to++Control+New+Pages+during+Mail+Merge

Format the first paragraph in the region to have a page break before it using Format / Paragraph / Line and Page Breaks.

I have removed the page break inside the mail merge region from your document and turn on the ‘page break before’ property of first paragraph of document. See the attached image for detail. I have attached the modified document with this post for your kind reference.

Please let us know if you have any more queries.

Hi Tahir,

Thanks a lot! I misunderstood the instruction in that page. I understood the first paragraph in the region, which I thought meant the first paragraph after TableStart.

I now understand what it means, and it works!

Again, thanks a lot!

Hi there,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.