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

Free Support Forum - aspose.com

How to extract text contained into the bullet of a list

Hello,

I am currently trying to get the text displayed as “bullet” in a customized list.
I cannot find the method which returns it.

On the file I upload as example, i want to get “Adress:”, “Type:” and “Reset:” for example.

Thank you in advance

Jean-Pascal Lim

Hi Jean-Pascal,

Thanks for your inquiry. Please use the ListLabel.LabelString property to get a string representation of list label as shown in following code snippet. Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document(MyDir + "testCustomList.docx");
doc.UpdateListLabels();
foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
{
    if (para.ListFormat.IsListItem)
    {
        ListLabel label = para.ListLabel;
        string labelstring = label.LabelString;
    }
}