Problems when merging multiple source documents into one target document when the items of the source documents contain numbered or bullited lists

Hey Aspose Crew,
A few months ago I was researching how to merge multiple source documents into one target document using Aspose.Words.
Using the “InsertDocument” code found on the Aspose forums I could get this to work (see attachment “InsertDocument.txt” which contains VB code).
In my test cases I have one target document containing some text like: “begin <@@replacethis@@> end” and one source document containing some text like: “test text”. I will merge this file 3 (or more) times into the target document, so this output document would contain:
" Begin
test text
test text
test text
End"

This works all correctly, even if I replace the “test text” with a table with one row. That output file would contain:
" Begin
< A three rowed table >
End" (Please see the Attachment “Table test.doc” for the output document.
The problem I have occures when I try to do the same with bullited lists or numeric lists.
When the source documents contain a bullited list or numeric list, the output document does not see this as one list. So the output contains:
"Begin

  1. Test text
  2. Test text
  3. Test text

End"

Instead of
"Begin

  1. Test text
  2. Test text
  3. Test text

End" (Please see the attachment “List test output.doc” for the output document and “List test intput.doc” for the input document.
This is probably because the InsertDocument works with Paragraphs & Section node, but I do not see why the table test should work correctly in that case.
Can you maybe supply a solution for this problem, or a explanation why this does occur with lists but not with table?
I look forward to you reply,
Kind Regards, Sjoerd van Loon
PS; on a related note, is there any indication when the “Update Table of Contents” feature will be released? Because that was also part of my research a few months back and at that time I found a release date “Q2/Q3 2009”. I saw that the “Updateable fields” - feature was already implemented for some part in the latest release notes.

Hi

Thanks for your inquiry. This occurs, because when you insert one document into another list items becomes members of different lists.
You have at least few ways to resolve the problem.

  1. Easy way. You can avoid using numbered lists in your document and use bulleted list. In this case, bullets will look the same, so you will not see difference.
  2. Easy way. Avoid using lists in your document. Instead of numbered list, you can use AUTONUN fields. In this case, MS Word will automatically update numbers.
  3. Requires programming effort. You can programmatically find paragraphs, which should be members of the same list and specify the same List for each paragraph:

https://reference.aspose.com/words/net/aspose.words.lists/listformat/list/
Hope this helps.
Regarding TOC fields, we are going to support this feature in one of the future releases, hopefully, before the end of this year. I linked your request to the appropriate issue. You will be notified as soon as this feature is supported.
Best regards.

Hi,
Thank you very much for you quick reply.

We will probably go for the hard way, using programming to determine which the members of a list are.

We are looking forward to the TOC support.

Kind Regards,
Sjoerd van Loon

The issues you have found earlier (filed as 10380) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(22)