We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Numbered lists continuing on mail merge with Aspose.Words for Java

Hi,

I’m trying to perform a mail merge with a template document that contains a numbered list. The problem is that the list numbering isn’t reset for each new generated document in the target document.

For example, if the template contains 3 numbered bullets:

1. item 1
2. item 2
3. item 3

then the first document in the target document will have bullets 1-3. The second will have 4-6 etc. I want the same bullets to be generated for every document i.e. document 1 should have 1-3, document 2 should have 1-3 etc.

I’ve attached a test document.

Thanks for any help on this matter. It seems like a small issue but I can’t find anything about it on the forums so far.

Kevin.


Looks like it is a bug in our MailMerge engine. I have logged this problem to our defect base as issue #1254. We will try to fix it in our next release which is currently planned for the end of October. Sorry for inconvenience.

To workaround you need to merge one data record at a time openning template document, calling MailMerge.Execute and saving result document for each data row.

Best regards,

Hi, I have the same problem with numbered lists in MailMerge.
Problem exists when list is embeded in TableStart and TableEnd tags:

TableStart:items

1. ABC
2. XYZ

TableEnd:items

if items size is 3 the result is:

1. ABC
2. XYZ


3. ABC
4. XYZ


5. ABC
6. XYZ


correct result should be:

1. ABC
2. XYZ


1. ABC
2. XYZ


1. ABC
2. XYZ

(Aspose.words for java 1.6, v.13.4.0.0, release-date: 2013.04.30)

Hi there,


Thanks for your inquiry. The issue (WORDSNET-858) reported in this thread is related to numbering of list. The lists are not restarted for each data row in a data source. The list numbering should be restarted when simple mail merge is performed. It is an issue.

You are using mail merge with regions. In this case, whole contents of document that are included inside a mail merge region automatically be repeated for every record in the data source. So the numbers will be continued in this case. Please read following documentation link for your kind reference.
http://www.aspose.com/docs/display/wordsnet/Mail+Merge+with+Regions+Explained

Hi Tahir,

This issue is now 11 years, yet it is still not working in aspose-words 17.6. I have the same issue as the original poster. The word doc contains a number list, but during mail merging this list continues with each record. This is a simple doc, without any regions.

Can you please confirm if the bug (#1254 as mentioned by milovan) has been fixed? Or if there are any workarounds?

There is another post (https://forum.aspose.com/t/mail-merge-problem-with-numbered-lists/95715) which seems to have the same issue but another internal bug was referenced; #6385).

Thanks,

Daniel

@dcalde,

Thanks for your inquiry. This issue has been resolved in latest version of Aspose.Words 17.9. Please use latest version of Aspose.Words for Java 17.9.