Free Support Forum - aspose.com

Extract List values

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I'm trying to extract the values from lists in word documents and translate them into xml.

For example the following list:

1. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

2. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

3. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

4. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

I'm trying to create the following

1.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

2.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

3.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

4.

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Any hints on how to capture the current number value in a list? The text you can get with GetText in the Paragraph.

When we are talking about for example Aspose.Words.NumberStyle.Arabic, Aspose.Words.NumberStyle.LowercaseLetter, Aspose.Words.NumberStyle.LowercaseRoman I can't see the

Value (in listnumber) while looking at the list in ListFormat.ListLevel.NumberFormat or ListFormat.ListLevel.NumberPosition.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Unfortunately, there is no way to get list item numbers using Aspose.Words. These numbers are not stored in the document. MS Word calculates list numbers on the fly during opening document. However, you can try to create your own method for calculating list numbers.

I created sample code for another customer to achieve similar task. Please see the following link to learn more.

http://www.aspose.com/community/forums/2/157078/multiple-conversion-issues/showthread.aspx

Best regards.