@ShivajiBU,
Please check the following code that demonstrates how to write new text in Word document by using existing List:
Document doc = new Document("E:\\Temp\\aspose ticket\\template.Docm");
doc.RemoveAllChildren();
doc.EnsureMinimum();
Aspose.Words.Lists.List targetList = null;
foreach (Aspose.Words.Lists.List list in doc.Lists)
{
if (list.Style != null && list.Style.Name == "Red Flag Details Outline")
{
targetList = list;
break;
}
}
if (targetList != null)
{
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Start");
builder.ParagraphFormat.Style.Name = targetList.Style.Name;
builder.ListFormat.List = targetList;
builder.ListFormat.ListLevel.StartAt = 1;
builder.Writeln("first level");
builder.ListFormat.ListIndent();
builder.Writeln("second level");
builder.ListFormat.ListIndent();
builder.Writeln("third level");
builder.Writeln("another entry on this level");
builder.ListFormat.ListIndent();
builder.Writeln("fourth level");
builder.ListFormat.List = null;
builder.Writeln("End");
}
doc.Save("E:\\Temp\\aspose ticket\\20.3.docm");
Hope, this helps in achieving what you are looking for.