Free Support Forum - aspose.com

Pagination control with MailMerge

From Jim:

Could you please tell me why the pagination in the Mail Merged version of this document seems to be off? Is there a problem with the template? This is the only template that appears to be causing this problem.

If you do a simple (without regions) mail merge for multiple records then whole document content is repeated for every record.

Every Word document consists of one or more Sections. Section has a property that specifies whether it starts on the same page (Continuous), new page, even or odd page etc.

When mail merging you need to pay attention to what section start is specified for the first section in your document as it gets appended to the end of the document for every new record in the dataset.

In your scenario this particular document happens to have first section start set to Continuous that’s why you don’t get page breaks between different records.

To specify section start setting, go to File, Page Setup in MS Word, select the Layout tab and specify Section Start.

Roman:

Thanks for pointing this out. There are a lot of items that have to be formatted correctly for the Mail Merge to work as intended. Sometimes its just mind boggling.

Jim