Hi
Thanks for your inquiry. I think that you can use the following code:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Start list
builder.ListFormat.ApplyNumberDefault();
builder.Writeln("this is 1 item");
builder.ListFormat.ListIndent();
builder.Write("this is 1.a item");
// Use linebreak instead paragraph break in the list
// Is you insert paragraph break you will get new list item
builder.InsertBreak(BreakType.LineBreak);
builder.Write("some text under 1.a item");
// Insert Paragraph break
// You can also use Writeln method instead Write in the previouse code line
builder.Writeln();
// Insert 1.b item
builder.Writeln("this is 1.b item");
// Outdent list level
builder.ListFormat.ListOutdent();
// Insert 2item
builder.Writeln("this is 2 item");
// End list
builder.ListFormat.RemoveNumbers();
// Save document
doc.Save(@"Test278\out.doc");
You can also configure your list using ListFormat and ListLevel properties. Please see the following link for more information.
https://reference.aspose.com/words/net/aspose.words.lists/listformat/
https://reference.aspose.com/words/net/aspose.words.lists/listformat/listlevel/
Hope this helps.
Best regards.