Custom Bullet Point

Can I use a character code to define a custom bullet character?

For instance I would like to define this triangle as my bullet character and I am having trouble doing so.

Hi,

Try the following:

var presentation = new PresentationDocument();
var slide = presentation.Slides.AddNew(SlideLayoutType.Blank);
var textBox = slide.Content.AddTextBox(ShapeGeometryType.Rectangle, 1, 1, 10, 5, LengthUnit.Centimeter);

var paragraph = textBox.AddParagraph();
paragraph.AddRun("First bullet item.");
paragraph.Format.IndentationSpecial = 27;
paragraph.Format.IndentationBeforeText = 27;

var list = paragraph.Format.List;
list.Level = 0;
list.BulletCharacter = new string((char)117, 1);
list.Font = "Wingdings 3";

presentation.Save("output.pptx");

Does this solve your issue?

Regards,
Mario

Yes. This is perfect. Thanks.

I’ve run into an issue with bullet points that has me befuddled. The text is wrapping, but I need the word elements to align with the word Develop above it. Is there an alignment format setting that would output this?

Screen Shot 2021-05-21 at 4.04.46 PM

Hi,

Change the IndentationSpecial to a minus value:

paragraph.Format.IndentationSpecial = -27;
paragraph.Format.IndentationBeforeText = 27;

Does this solve your issue?

Regards,
Mario

1 Like

Yes, that does it. Thanks much.