How to add a bullet with the character "-"

Hello all
I am stuck for a silly thing. I need to add a bullet with the simple “-”.

I tried

DocumentBuilder.ListFormat.List = DocumentBuilder.Document.Lists.Add(ListTemplate.xxx)

but should I use in xxx for only getting the “-” character. I don’t need a real bullet.

Thanks for your help.

Nicolas

Hi Nicolas,

Thanks for your inquiry. Please use the following code snippet to achieve your requirement. Hope this helps you. If you still face problem, 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();
// Create a list based on one of the Microsoft Word list templates.
Aspose.Words.Lists.List list = doc.Lists.Add(ListTemplate.NumberDefault);
// Completely customize one list level.
ListLevel level1 = list.ListLevels[0];
level1.Font.Color = Color.Red;
level1.Font.Size = 24;
level1.NumberStyle = NumberStyle.Bullet;
level1.NumberFormat = "-";
DocumentBuilder builder = new DocumentBuilder(doc);
builder.ListFormat.List = list;
builder.Writeln("The quick brown fox...");
builder.Writeln("The quick brown fox...");
builder.Writeln("jumped over the lazy dog.");
builder.Writeln("jumped over the lazy dog.");
builder.Writeln("The quick brown fox...");
builder.ListFormat.RemoveNumbers();
doc.Save(MyDir + "Lists.CreateCustomList Out.doc");