Paragraph Style
using IronPPT;
using IronPPT.Enums;
using IronPPT.Models;

// Create new PowerPoint presentation
var document = new PresentationDocument();

// Style paragraph
var style = new ParagraphStyle()
{
    NoBullet = true,
    RightToLeft = true,
    ContextualSpacing = true,
    Indent = 15.00,
    Alignment = TextAlignmentTypeValues.Center,
    LineSpacing = 10,
    SpaceAfter = 15,
    SpaceBefore = 15,
};

var paragraph = new Paragraph();
paragraph.Style = style;
paragraph.AddText("First paragraph.");

// Add paragraph
document.Slides[0].AddParagraph(paragraph);

// Export PowerPoint presentation
document.Save("styledParagraph.pptx");
Imports IronPPT
Imports IronPPT.Enums
Imports IronPPT.Models

' Create new PowerPoint presentation
Dim document = New PresentationDocument()

' Style paragraph
Dim style = New ParagraphStyle() With {
    .NoBullet = True,
    .RightToLeft = True,
    .ContextualSpacing = True,
    .Indent = 15.0,
    .Alignment = TextAlignmentTypeValues.Center,
    .LineSpacing = 10,
    .SpaceAfter = 15,
    .SpaceBefore = 15
}

Dim paragraph = New Paragraph()
paragraph.Style = style
paragraph.AddText("First paragraph.")

' Add paragraph
document.Slides(0).AddParagraph(paragraph)

' Export PowerPoint presentation
document.Save("styledParagraph.pptx")
NuGet Download
PM > Install-Package IronPPT
Paragraph Style

Paragraph Style

Adding slides to PowerPoint is essential to produce informative content to present. Furthermore, the ability to fully customize the text and paragraphs themselves further enhances the ability to highlight key points or informative pieces that you want to emphasize. IronPPT, a powerful library for working with PowerPoint presentations in .NET applications, allows you to do all of that with paragraph styling, enabling developers to fully customize and control each aspect of the paragraph, such as line spacing, text alignment, indent, and whether it's a bullet list or not, all within one library.

5-Step Code to Add Paragraph Style

  • var style = new ParagraphStyle() {NoBullet = true, ...};
  • var paragraph = new Paragraph();
  • paragraph.Style = style;
  • paragraph.AddText("First paragraph.");
  • document.Slides[0].AddParagraph(paragraph/);

Code Explanation

To change the paragraph styling in a document, we begin by instantiating a new ParagraphStyle class, which provides us with the foundation to customize various properties according to our needs.

First, we set the NoBullet property to true, indicating that the paragraph is a continuous block of text rather than being fragmented into bullet points. This choice helps maintain clarity when presenting information.

Once we have customized each property to our liking, we assign the configured ParagraphStyle back to the Style property of the empty Paragraph we initially created. To illustrate the functionalities, we proceed to add text using the AddText method. Finally, we integrate the paragraph into the PowerPoint presentation by accessing the first slide through the Slides array and employing the AddParagraph method to add our customized paragraph.

Discover How to Manage Slides with IronPPT
View on GitHub

Ready to Get Started?

Nuget Downloads 6,246Version:2026.10just released