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

Free Support Forum - aspose.com

Unexpected renumbering after appending document

Hi,

i append two documents with numbered lists
Used Aspose.Word version 13.3.0.0

When i append them with this code:

Aspose.Words.Document doc = new Aspose.Words.Document(“example.docx”);
Aspose.Words.Document doc2 = new Aspose.Words.Document(“example1.docx”);

doc.AppendDocument(doc2, Aspose.Words.ImportFormatMode.UseDestinationStyles);
doc.Save(“result.docx”);

The result is not as expected. The numbering of the second numbered list failed.
I attach the files.

Kind regards,
Guido

Hi Guido,


Thanks for your inquiry. I have managed to reproduce the same issue at my side. I have logged this issue as WORDSNET-8230 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Guido,


Thanks for your patience. On further investigation our development team came to know that they won’t be able to implement the fix to your issue. Your issue will be closed with ‘‘Won’t Fix’’ resolution.

Please note that when you copy content from one document to another and your source and destination documents contain lists, Aspose.Words copies list from the source document to the destination. That is why numbering of items will not continue. If you need that numbering continues, you should apply numbering in source and destination documents using styles and use UseDestinationStyles option upon copying content from one document to another.

In this case, if names of styles you applied to the paragraphs are the same, the style from the source document will not be copied into the destination document. The copied paragraphs will use styles from the destination document. And since you applied numbering using paragraph styles, the paragraphs from the destination document and the copied paragraphs will become members of the same list and numbering will continue.

I would suggest you please read the following article for more details:

The numbering for paragraphs in your documents is specified via style (arial8textbulletnumbersnospace) and direct formatting is also applied to paragraphs. Please clear the formatting and apply only (arial8textbulletnumbersnospace) style. In this case numbering will continuous. I have attached the modified documents with this post.