Add Paragraph

Adding paragraphs to a PowerPoint presentation programmatically saves considerable manual work, particularly as the slide count grows.

IronPPT gives developers control over paragraph content on each slide. Populating a slide takes only a couple of lines of code.

5-Step Guide to Adding Paragraphs

  • var document = new PresentationDocument();
  • var paragraph = new Paragraph();
  • paragraph.AddText("First paragraph.");
  • document.Slides[0].AddParagraph(paragraph);
  • document.Save("addParagraph.pptx");

Code Explanation

Before we add a new paragraph, we first instantiate a new PresentationDocument as our empty PowerPoint presentation. Afterwards, we instantiate a new Paragraph object, and use the AddText method to add some text to it.

Finally, we access the slides by accessing the Slides property, which returns an array of Slide objects that represent the slides in the current PowerPoint presentation. We pass the Paragraph object to the AddParagraph to add the paragraph to the first slide, then finally save the edited PowerPoint presentation with Save.

Explore Slide Management with IronPPT

Ready to Get Started?
Nuget Downloads 5,943 | Version: 2026.8 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPPT
run a sample watch your PDF become editable text.