Paragraph

ForEach.Paragraph method

迭代每个ParagraphPresentation中。 形状将在所有类型的幻灯片中迭代 -Slide,MasterSlideLayoutSlide

public static void Paragraph(Presentation pres, ForEachParagraphCallback forEachParagraph)
范围类型描述
presPresentation表示迭代段落
forEachParagraphForEachParagraphCallback将为每个段落调用的回调

例子

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

也可以看看