Portion

Portion(Presentation, ForEachPortionCallback)

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

public static void Portion(Presentation pres, ForEachPortionCallback forEachPortion)
ParameterTypeDescription
presPresentationPresentation to iterate portions
forEachPortionForEachPortionCallbackCallback that will be invoked for each portion

Examples

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

See Also


Portion(Presentation, bool, ForEachPortionCallback)

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

public static void Portion(Presentation pres, bool includeNotes, 
    ForEachPortionCallback forEachPortion)
ParameterTypeDescription
presPresentationPresentation to iterate portions
includeNotesBooleanFlag that indicates whether NotesSlides should be included in processing.
forEachPortionForEachPortionCallbackCallback that will be invoked for each portion

Examples

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

See Also