How to set List identifier?

Hi there,
This is based on StyleCollection.addCopy(Style) not working correctly, but not focusing on error aspect, but trying to get some information on setting list identifier, so keep this as separate discussion.

As we discussed in the link, the StyleCollection.addCopy(Style), is changing the list identifier (w:numId) to 3 (which we now see as a reference to abstract definition defined in word/numbering.xml, where the actual implementation defines).

Since the original style is having the numId as 1.

- <w:numPr>
<w:numId w:val="1" />
</w:numPr>

We want to set the list identifier back to 1. The Aspose.Words's List class has the getter method for the list identifier but I'm seeing not setter for the same.

Could you please tell us how to set the List identifier?

Thanks.

Hi Praneeth,


Thanks for your inquiry. There are two Lists in your Word document and you will notice that another List is added after when your code is executed (check doc.Lists.Count). The ‘ListId’ represents a unique identifier that can be used to obtain a reference to a List. I think, you can not have same value for ListId for two different Lists in a Document. This seems to be an expected behavior. If we can help you with anything else, please feel free to ask.

Best regards,