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

Free Support Forum - aspose.com

How to add a bullet with the character "-"

Hello all :slight_smile:

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();<o:p></o:p>

// 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");