Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents from any .NET(C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Wed Apr 14, 2021 5:51 pm

Is there any way to create multi-level bullet points for PPT?

b_knight
 
Posts: 2
Joined: Wed Apr 14, 2021 5:20 pm

Thu Apr 15, 2021 9:24 am

Hello,

Thank you for your inquiry. Our product Spire.Presentation for .NET provides the method to create multi-level bullet points for PPT, please refer to the code below, if it has no help, please provide your sample PPT document for further investigation. You could attach it here or send to us via email (support@e-iceblue.com).

Code: Select all
 
           //Create a PPT document
            Presentation presentation = new Presentation();

            //Load PPT file from disk
            presentation.LoadFromFile("input.pptx");
            //Get the first slide
            ISlide slide = presentation.Slides[0];

            //Access the first placeholder in the slide and typecasting it as AutoShape
            ITextFrameProperties tfp = ((IAutoShape)slide.Shapes[1]).TextFrame;

            //Access the first Paragraph and set bullet style
            TextParagraph para= tfp.Paragraphs[0];       
            para.BulletType = TextBulletType.Symbol;
            para.BulletChar = Convert.ToChar(8226);
            para.Depth = 0;

             //Access the second Paragraph and set bullet style
             para = tfp.Paragraphs[1];
             para.BulletType = TextBulletType.Symbol;
             para.BulletChar = '-';
             para.Depth = 1;

             //Access the third Paragraph and set bullet style
             para = tfp.Paragraphs[2];
             para.BulletType = TextBulletType.Symbol;
             para.BulletChar = Convert.ToChar(8226);
             para.Depth = 2;

             //Access the fourth Paragraph and set bullet style
             para = tfp.Paragraphs[3];
             para.BulletType = TextBulletType.Symbol;
             para.BulletChar = '-';
             para.Depth = 3;

            presentation.SaveToFile("output.pptx", FileFormat.Pptx2013);


Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 523
Joined: Wed Apr 07, 2021 2:50 am

Thu Apr 15, 2021 6:49 pm

This worked perfectly, thanks!

b_knight
 
Posts: 2
Joined: Wed Apr 14, 2021 5:20 pm

Fri Apr 16, 2021 1:59 am

Hello,

Thank you for your feedback. If you have other questions about using Spire. Presentation in the future, please feel free to contact us.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 523
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Presentation