Reputation: 21
if (item.Name == "ol")
{
int bulletposition = 1;
List UDFList1 = doc.AddList("", 0, NV.ListItemType.Numbered , 1);
foreach (var innerItem in item.ChildNodes)
{
string bal = innerItem.InnerText.Replace("\r\n", "").Replace("\n", "").Replace("\r", "").Trim();
doc.AddListItem(UDFList1, bal, bulletposition);
}
doc.InsertList(UDFList1);
doc.InsertParagraph(" ", false);
}
This is my code to convert html in word format where the html tag starts with . In this case the convert word document should be in numeric order starting with 1 then 2 and goes on but the result is in alphabetical order i.e a then b and goes on.enter image description here
Upvotes: 2
Views: 70