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

Free Support Forum - aspose.com

Word list problem

Hi, is it possible to convert an unordered multi level list to an ordered list?

Hi Pavlos,


Thanks for your inquiry. Please use the following code snippet to change the unordered list to ordered list. Hope this helps you. If you still face problem, please attach your input Word document here for testing. We will then provide you more information on this along with code.

Document doc = new
Document(MyDir + “list.docx”);<o:p></o:p>

Aspose.Words.Lists.List list = doc.Lists.Add(ListTemplate.NumberArabicParenthesis);

foreach (Paragraph paragraph in doc.GetChildNodes(NodeType.Paragraph, true))

{

if (paragraph.ListFormat.IsListItem)

paragraph.ListFormat.List = list;

}

doc.Save(MyDir + "out.docx");