Paragraph

Paragraph(Presentation, ForEachParagraphCallback)

Iterate each Paragraph in the Presentation. Shapes will be iterated in all type of slides - Slide, MasterSlide and LayoutSlide

public static void Paragraph(Presentation pres, ForEachParagraphCallback forEachParagraph)
ParameterTypeDescription
presPresentationPresentation to iterate paragraphs
forEachParagraphForEachParagraphCallbackCallback that will be invoked for each paragraph

Examples

using (Presentation pres = new Presentation("pres.pptx"))
{
    ForEach.Paragraph(pres, (para, slide, index) =>
    {
        System.Console.WriteLine($"{para.Text}, index: {index}");
    });
}        

See Also


Paragraph(Presentation, bool, ForEachParagraphCallback)

Iterate each Paragraph in the Presentation. Shapes will be iterated in all type of slides - Slide, MasterSlide, LayoutSlide and NotesSlide

public static void Paragraph(Presentation pres, bool includeNotes, 
    ForEachParagraphCallback forEachParagraph)
ParameterTypeDescription
presPresentationPresentation to iterate paragraphs
includeNotesBooleanFlag that indicates whether NotesSlides should be included in processing.
forEachParagraphForEachParagraphCallbackCallback that will be invoked for each paragraph

Examples

using (Presentation pres = new Presentation("pres.pptx"))
{
    ForEach.Paragraph(pres, true, (para, slide, index) =>
    {
        System.Console.WriteLine($"{para.Text}, index: {index}");
    });
}        

See Also