Word Extract Does Not Include Numbers From List

If I create a number list (like a bullet list) Word will number it.

When I extract the text using Aspose it does not included those auto numbers.
Is there a way to include theses numbers in the extracted text?

In Word if I save as .txt it does include the list numbers.

Hi,

Thanks for your inquiry. I suppose you should just call Document.UpdateListLabels method to update list label properties such as LabelValue and LabelString for each ListLabel object in the document. Secondly, to get the value of a list item you can use the ListLabel class and the ListLabel.LabelValue member. Moreover, please try using the following code snippet to output the whole Paragraph to text format:

Document doc = new Document(@"C:\Temp\numbered.doc");
doc.UpdateListLabels();
foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))
    if (para.IsListItem)
        Console.WriteLine(para.ToString(SaveFormat.Text));

I hope, this helps.

Best regards,

For the test document it worked. Thanks

Hi,

Thanks for your feedback on this. It’s great you were able to achieve what you were looking for. Please let us know any time you have any further queries.

Best regards,