Resetting Page Numbers via mailmerge

Hi,

I executed the mailmerge using ExecuteNestedGroup(dataset, command). Is there a way where I can reset the page number after each record in the output file (dotx file)?

Thanks,

Paul


3 Replies

SB Suriya Balamurugan Syncfusion Team July 20, 2022 02:37 PM UTC

Hi Paul,

Currently we are checking your query. We will update further details on or before 22nd July 2022.

Regards,
Suriya Balamurugan.



AN Anto Nihil Sahaya Raj Syncfusion Team July 22, 2022 03:50 PM UTC

Hi Paul,


Still, we are analyze and preparing sample to achieve your requirement. We will share the sample on 25th July 2022.

Regards,
Anto Nihil S







SB Suriya Balamurugan Syncfusion Team July 25, 2022 11:45 AM UTC

Hi Paul,

From the given details, we have found that your requirement is to reset the page numbers after each record. To reset the page number as per your requirement, each record in the Word document must be split like section by section. But DocIO doesn’t support mail merge execution in multiple section. So, after executing the mail merge, we have split each record into a section in the Word document. Then enables the RestartPageNumbering flag and set the PageStartingNumber to achieve your requirement.

We have prepared the sample application to reset the page number for each record as per your requirement and it can be downloaded from the below attachment.

Note: Please find the input template Word document in the “Data” folder of the attached sample application.

In the template Word document, we have added the place holder (#SectionBreak#) before at the end of the group to indicate where to insert a section break.

In this attached sample, we have done the following things.
1. Opens the template Word document.
2. Executes the mail merge.
3. Splits each record into sections.
4. Enables the restart page numbering flag and set the page starting number for each section.
5. Saves the Word document.

Regards,
Suriya Balamurugan.




Attachment: Mailmergewithdynamicobjects_6d6cb0a4.zip

Loader.
Up arrow icon