I need to have 2 bullet lists in a section.
Eligibility
1.
2.
3.
T & C
1.
2.
3.
How do I use the IsRestartNumbering to reset the Count?
Currently I get it as
Eligibility
1.
2.
3.
T & C
4.
5.
6.
Regards,
Ashish
//create a new doc document
Document document = new Document();
//add one section
Section section = document.AddSection();
//create a listStyle
ListStyle listStyle = new ListStyle(document, ListType.Numbered);
listStyle.Name = "levelstyle";
listStyle.Levels[0].PatternType = ListPatternType.Arabic;
document.ListStyles.Add(listStyle);
//create another listStyle
ListStyle listStyle2 = new ListStyle(document, ListType.Numbered);
listStyle2.Name = "levelstyle2";
listStyle2.Levels[0].PatternType = ListPatternType.Arabic;
document.ListStyles.Add(listStyle2);
//apply the first style to the paragraph
Paragraph paragraph = section.AddParagraph();
paragraph.AppendText("One");
paragraph.ListFormat.ApplyStyle("levelstyle");
paragraph = section.AddParagraph();
paragraph.AppendText("Two");
paragraph.ListFormat.ApplyStyle("levelstyle");
//apply the second style to the paragraph
paragraph = section.AddParagraph();
paragraph.AppendText("one");
paragraph.ListFormat.ApplyStyle("levelstyle2");
paragraph = section.AddParagraph();
paragraph.AppendText("Two");
paragraph.ListFormat.ApplyStyle("levelstyle2");
//Save doc file
document.SaveToFile(@"8232result.docx", FileFormat.Docx);