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.

