When parse temple restart the header numering after section

Hello

I am using Aspose Total for Java to parse a template with merge fields, but when I perform this process, the header numberings are reset after section break.

I have performed several parse tests, but the header numbering reset problem is always reproduced in any type of section(new or continuous page).

Also on the Aspose Words website there is a section for testing, Mail Merge , and the problem is also repeated.

Below I attach the original document and the result generated by the web page:

Original:test_aspose.docx (22.4 KB)

Result:Output_web.docx (18.5 KB)

I need help to solve the problem,

Greetings and Thanks

@xroig You should set RestartListsAtEachSection to false to get the expected result:

Document doc = new Document("C:\\Temp\\in.docx");
doc.getMailMerge().setRestartListsAtEachSection(false);
doc.getMailMerge().execute(new String[] {"test"}, new String[] {"value"});
doc.save("C:\\Temp\\out.docx");
1 Like

Hello

Thanks for the solution Alexey, works perfectly.

Regards

1 Like