C#/VB.NET: Create Numbered or Bulleted Lists in PowerPoint

Lists are a powerful tool in PowerPoint presentations that enable you to organize and present information in a clear and concise manner. Whether you're showcasing key points, summarizing ideas, or highlighting important details, utilizing lists can enhance the visual appeal, readability and professionalism of your slides. In this article, we will explore how to create numbered lists and bulleted lists in PowerPoint presentations in C# and VB.NET using Spire.Presentation for .NET.

Install Spire.Presentation for .NET

To begin with, you need to add the DLL files included in the Spire.Presentation for.NET package as references in your .NET project. The DLL files can be either downloaded from this link or installed via NuGet.

PM> Install-Package Spire.Presentation

Create a Numbered List in PowerPoint in C# and VB.NET

A numbered list in PowerPoint is a list of items where each item is preceded by a number or a sequence of numbers. It follows a sequential order, typically starting from 1 and progressing incrementally. Numbered lists are commonly used to present steps, instructions, rankings, or any information that requires a specific order.

To create a numbered list in a PowerPoint presentation using Spire.Presentation for .NET, you can follow these steps:

  • Create a Presentation object.
  • Get the first slide using Presentation.Slides[0] property.
  • Append a shape to the slide using ISlide.Shapes.AppendShape() method and set the shape style.
  • Specify the items of the list inside a String array.
  • Create paragraphs based on the list items, and set the bullet type of these paragraphs to Numbered using ParagraphProperties.BulletType property.
  • Set the numbered bullet style of these paragraphs using ParagraphProperties.BulletStyle property.
  • Add these paragraphs to the shape using IAutoShape.TextFrame.Paragraphs.Append() method.
  • Save the document to a PowerPoint file using Presentation.SaveToFile() method.
  • C#
  • VB.NET
using Spire.Presentation;
using Spire.Presentation.Drawing;
using System.Drawing;

namespace CreateNumberedList
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //Create a Presentation object
            Presentation presentation = new Presentation();
            //Get the first slide
            ISlide slide = presentation.Slides[0];

            //Add a shape to the slide and set the shape style
            IAutoShape shape = slide.Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(50, 50, 300, 200));
            shape.Fill.FillType = FillFormatType.None;
            shape.Line.FillType= FillFormatType.None;

            //Add text to the default paragraph
            TextParagraph paragraph = shape.TextFrame.Paragraphs[0];
            paragraph.Text = "Required Web Development Skills:";
            paragraph.Alignment = TextAlignmentType.Left;
            paragraph.TextRanges[0].Fill.FillType = FillFormatType.Solid;
            paragraph.TextRanges[0].Fill.SolidColor.Color = Color.Black;

            //Specify the list items
            string[] listItems = new string[] {
                " Command-line Unix",
                " Vim",
                " HTML",
                " CSS",
                " Python",
                " JavaScript",
                " SQL"
            };

            //Create a numbered list
            foreach (string item in listItems)
            {
                TextParagraph textParagraph = new TextParagraph();
                textParagraph.Text = item;
                textParagraph.Alignment = TextAlignmentType.Left;
                textParagraph.TextRanges[0].Fill.FillType = FillFormatType.Solid;
                textParagraph.TextRanges[0].Fill.SolidColor.Color = Color.Black;

                textParagraph.BulletType = TextBulletType.Numbered;
                textParagraph.BulletStyle = NumberedBulletStyle.BulletArabicPeriod;
                shape.TextFrame.Paragraphs.Append(textParagraph);
            }

            //Save the result document
            presentation.SaveToFile("NumberedList.pptx", FileFormat.Pptx2013);
        }
    }
}

C#/VB.NET: Create Numbered or Bulleted Lists in PowerPoint

Create a Symbol Bulleted List in PowerPoint in C# and VB.NET

A symbol bulleted list in PowerPoint uses symbols instead of numbers to visually represent each item. Symbol bulleted lists are useful for presenting non-sequential information or a collection of points without a specific order.

To create a symbol bulleted list in a PowerPoint presentation using Spire.Presentation for .NET, you can follow these steps:

  • Create a Presentation object.
  • Get the first slide using Presentation.Slides[0] property.
  • Append a shape to the slide using ISlide.Shapes.AppendShape() method and set the shape style.
  • Specify the items of the list inside a String array.
  • Create paragraphs based on the list items, and set the bullet type of these paragraphs to Symbol using ParagraphProperties.BulletType property.
  • Add these paragraphs to the shape using IAutoShape.TextFrame.Paragraphs.Append() method.
  • Save the document to a PowerPoint file using Presentation.SaveToFile() method.
  • C#
  • VB.NET
using Spire.Presentation;
using Spire.Presentation.Drawing;
using System.Drawing;

namespace CreateSymbolBulletedList
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //Create a Presentation object
            Presentation presentation = new Presentation();
            //Get the first slide
            ISlide slide = presentation.Slides[0];

            //Add a shape to the slide and set the shape style
            IAutoShape shape = slide.Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(50, 50, 350, 200));
            shape.Fill.FillType = FillFormatType.None;
            shape.Line.FillType = FillFormatType.None;

            //Add text to the default paragraph
            TextParagraph paragraph = shape.TextFrame.Paragraphs[0];
            paragraph.Text = "Computer Science Subjects:";
            paragraph.Alignment = TextAlignmentType.Left;
            paragraph.TextRanges[0].Fill.FillType = FillFormatType.Solid;
            paragraph.TextRanges[0].Fill.SolidColor.Color = Color.Black;

            //Specify the list items
            string[] listItems = new string[] {
                " Data Structure",
                " Algorithm",
                " Computer Networks",
                " Operating System",
                " Theory of Computations",
                " C Programming",
                " Computer Organization and Architecture"
            };

            //Create a symbol bulleted list
            foreach (string item in listItems)
            {
                TextParagraph textParagraph = new TextParagraph();
                textParagraph.Text = item;
                textParagraph.Alignment = TextAlignmentType.Left;
                textParagraph.TextRanges[0].Fill.FillType = FillFormatType.Solid;
                textParagraph.TextRanges[0].Fill.SolidColor.Color = Color.Black;
                textParagraph.BulletType = TextBulletType.Symbol;
                shape.TextFrame.Paragraphs.Append(textParagraph);
            }

            //Save the result document
            presentation.SaveToFile("SymbolBulletedList.pptx", FileFormat.Pptx2013);
        }
    }
}

C#/VB.NET: Create Numbered or Bulleted Lists in PowerPoint

Create an Image Bulleted List in PowerPoint in C# and VB.NET

An image bulleted list in PowerPoint replaces the traditional bullet points with small images or icons. Instead of using numbers or symbols, each item is represented by an image that adds a visual element to the list. Image bulleted lists are commonly used when you want to incorporate visual cues or represent items with relevant icons or graphics.

To create an image bulleted list in a PowerPoint presentation using Spire.Presentation for .NET, you can follow these steps:

  • Create a Presentation object.
  • Get the first slide using Presentation.Slides[0] property.
  • Append a shape to the slide using ISlide.Shapes.AppendShape() method and set the shape style.
  • Specify the items of the list inside a String array.
  • Create paragraphs based on the list items, and set the bullet type of these paragraphs to Picture using ParagraphProperties.BulletType property.
  • Set the image that will be used as bullets using ParagraphProperties.BulletPicture.EmbedImage property.
  • Add these paragraphs to the shape using IAutoShape.TextFrame.Paragraphs.Append() method.
  • Save the document to a PowerPoint file using Presentation.SaveToFile() method.
  • C#
  • VB.NET
using Spire.Presentation;
using Spire.Presentation.Drawing;
using System.Drawing;

namespace CreateImageBulletedList
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //Create a Presentation object
            Presentation presentation = new Presentation();
            //Get the first slide
            ISlide slide = presentation.Slides[0];

            //Add a shape to the slide and set the shape style
            IAutoShape shape = slide.Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(50, 50, 400, 180));
            shape.Fill.FillType = FillFormatType.None;
            shape.Line.FillType = FillFormatType.None;

            //Add text to the default paragraph
            TextParagraph paragraph = shape.TextFrame.Paragraphs[0];
            paragraph.Text = "Project Task To-Do List:";
            paragraph.Alignment = TextAlignmentType.Left;
            paragraph.TextRanges[0].Fill.FillType = FillFormatType.Solid;
            paragraph.TextRanges[0].Fill.SolidColor.Color = Color.Black;

            //Specify the list items
            string[] listItems = new string[] {
                " Define projects and tasks you're working on",
                " Assign people to tasks",
                " Define the priority levels of your tasks",
                " Keep track of the progress status of your tasks",
                " Mark tasks as done when completed"
            };

            //Create an image bulleted list
            foreach (string item in listItems)
            {
                TextParagraph textParagraph = new TextParagraph();
                textParagraph.Text = item;
                textParagraph.Alignment = TextAlignmentType.Left;
                textParagraph.TextRanges[0].Fill.FillType = FillFormatType.Solid;
                textParagraph.TextRanges[0].Fill.SolidColor.Color = Color.Black;
                textParagraph.BulletType = TextBulletType.Picture;
                IImageData image = presentation.Images.Append(Image.FromFile("icon.png"));
                textParagraph.BulletPicture.EmbedImage = image;
                shape.TextFrame.Paragraphs.Append(textParagraph);
            }

            //Save the result document
            presentation.SaveToFile("ImageBulletedList.pptx", FileFormat.Pptx2013);
        }
    }
}

C#/VB.NET: Create Numbered or Bulleted Lists in PowerPoint

Apply for a Temporary License

If you'd like to remove the evaluation message from the generated documents, or to get rid of the function limitations, please request a 30-day trial license for yourself.