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

Free Support Forum - aspose.com

Using bullet points in PPTX Presentation

Hello,


I have not been able to find documentation for how to use bullet points in a PPTX presentation. I have attached an example document showing the kind of output I need. If possible, could you provide some example code to create this using the Aspose.Slides PPTX API.

Thanks.
Shaun

Hi Shaun,

I am sorry the requested code snippet is unavailable in online documentation. I will add it online documentation for further future reference. Please use the code snippet given below to accomplish the goal.

PresentationEx pres = new PresentationEx();

//Accessing first slide

SlideEx slide = pres.Slides[0];

slide.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 0, 0, 500, 100);

//Accessing the first and second placeholder in the slide and typecasting it as AutoShape

TextFrameEx txtFrame = ((AutoShapeEx)slide.Shapes[0]).TextFrame;

//Change the text in Text frames

txtFrame.Text = "First line text";

//Getting the first paragraph of the placeholders

ParagraphEx para1 = txtFrame.Paragraphs[0];

para1.Alignment = TextAlignmentEx.Left;

para1.BulletType = BulletTypeEx.Symbol;

//para1.Indent = 144;

ParagraphEx para2 = new ParagraphEx();

para2.BulletType = BulletTypeEx.Symbol ;

para2.Depth = 1;

// para2.Indent = 144;

para2.Alignment = TextAlignmentEx.Left ;

para2.Text = "2nd line text";

txtFrame.Paragraphs.Add(para2);

pres.Write("d:\\MarginIndentAlign.pptx");

Thanks and Regards,

Thank you. Just what I needed.