Resetting Numbering List in Word Document

Hi Team,

Automatically, resetting a numbering List and starts as “1” in Portrait Page when previous page as Landscape Orientation and it happened while executing “mailmerge.execute()” method to generate a document.

But, i don’t want to reset a numbering list when page orientation changes from landscape to portrait as well as vice-versa

I have attached Sample Test Package. Please have a look and provide a solution for this issue.
SampleTest_Package.zip (35.2 KB)

Thanks in Advance !!

@rgadipalli You should specify MailMerge.RestartListsAtEachSection to get the desired result. For example see the following code:

Document doc = new Document("C:\\Temp\\in.docx");
doc.getMailMerge().setRestartListsAtEachSection(false);
doc.getMailMerge().execute(fieldNames, values);
doc.save("C:\\Temp\\out.docx", SaveFormat.DOCX);