Manage List Number after Deleting Paragraph in the middle of List using Java

Hi Team,

How can we automatically adjust numbering if rich content control / paragraph is deleted. So suppose , i have the following paragraphs in document :

1.Paragraph 1
2.Paragraph 2
3.Paragraph 3
4.Paragraph 4
5.Paragraph 5

And if i delete 3rd paragraph , my output should be :

1.Paragraph 1
2.Paragraph 2
3.Paragraph 4
4.Paragraph 5

How do i code so that numbering adjust itself.

@saurabh.arora

Please note that Aspose.Words mimics the behavior of MS Word. You do not need to adjust the list number. It is done by MS Word automatically. If you delete the paragraph using Node.Remove method and save the document, the list number will be updated by MS Word when you open the document in it.

Moreover, if you want to get the list number using Aspose.Words, please call Document.UpdateListLabels method to updates list labels for all list items in the document.

If you still face problem, please ZIP and attach your input and expected output Word documents here for our reference. We will then provide you more information on it.