Trouble getting list label string

Good day.

I’m attempting to get the list labels from a very simple list. The attached document has a relatively simple nested and numbered list.

I’m looping through, following the example here.

*<cfif currentPara.isListItem()>

Current list label: listlabel#*

But all I am getting are blank labels - 9 of them, exactly as many list items as are in the document.

Can you please tell me what I am doing wrong? I’m trying to get e.g. “1.0”, “4.1”, etc.

Thank you.

For test purposes, I installed the new Aspose.words that was just released June 4 and verified that the issue does occur in the new version as well. Thank you.

Hi Chris,

Thanks for your inquiry. Please update list labels for all list items in the document by using Document.UpdateListLabels method. It updates list label properties such as LabelValue and LabelString for each ListLabel object in the document. I hope, this helps.

Best regards,

Thank you. I knew I was missing something. That allowed us to get the list labels correctly.

Hi Chris,

Thanks for your feedback. Please let us know any time you have any further queries. We are always glad to help you.

Best regards,