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

Free Support Forum - aspose.com

Numeric rows

image.png (10.2 KB)
How do I make sure that the lines highlighted in red are not numbered?

@azamatik471

Please use Paragraph.IsListItem property to check either paragraph is list item or not.

Could you please share some more detail about your requirement along with input and output documents? We will then provide you more information about your query.

I add one numeric row, etc 1
Theh i want some not numeric rows
then i want add next numeric row, etc 2

But i dont now how add some rows without numerics i run numeric builder.ListFormat.ApplyNumberDefault()

@azamatik471

Please use ListLevel.NumberFormat property as shown below to get the desired output.

If this does not help you, please manually create your expected Word document using Microsoft Word and attach it here for our reference. We will investigate how you want your final Word output be generated like. We will then provide you more information on this along with code.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Writeln("Aspose.Words allows:");

List list = doc.Lists.Add(ListTemplate.NumberDefault);

ListLevel listLevel = list.ListLevels[0];
listLevel.NumberFormat = "\x0000";

builder.ListFormat.List = list;
builder.Writeln("Opening documents from different formats:");

builder.ListFormat.ListIndent();

ListLevel listLevel2 = list.ListLevels[1];
listLevel2.NumberFormat = "";

builder.Writeln("DOC");
builder.Writeln("PDF");
builder.Writeln("HTML");

builder.ListFormat.ListOutdent();

builder.Writeln("Processing documents");
builder.Writeln("Saving documents in different formats:");

builder.ListFormat.ListIndent();
builder.Writeln("DOC");
builder.Writeln("PDF");
builder.Writeln("HTML");
builder.Writeln("MHTML");
builder.Writeln("Plain text");

// Outdent the list level again.
builder.ListFormat.ListOutdent();
builder.Writeln("Doing many other things!");

// End the numbered list.
builder.ListFormat.RemoveNumbers();

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