facebooktwittermenuarrow-up

GemBox Support Forum

Accessing section

Hi There,

I was looking at using sections in my “Template” PPTX to allow a little more flexibility to clone multiple slides that are related. I have not been able to find a way to get a section of a powerpoint in Gembox. Is this a thing that can be done?

Any help would be greatly appreciated.
Cheers,
Nathan

Hi,

GemBox.Presentation currently doesn’t provide API support for sections.
However, we have decided that we will implement this feature for you.
I will contact you again soon.

Regards,
Mario

Thanks Mario,

That is greatly appreciated!

Looking forward to hearing from you.
Cheers,
Nathan

Hi Mario,

Just wondering what sort of timeframe until we see this implemented and available for us to code against?
Kind regards,
Nathan

Hi Nathan,

Please try again with this bugfix:
https://www.gemboxsoftware.com/presentation/nightlybuilds/GBP25v1136.zip

Or this NuGet package:
Install-Package GemBox.Presentation -Version 25.0.1136-hotfix

We added support for PresentationDocument.Sections collection. For your use case, you can use something like the following to iterate through slides of some specific section:

PresentationDocument presentation = PresentationDocument.Load("Template.pptx");
Section section = presentation.Sections.First(s => s.Name == "My Section");
foreach (Slide slide in section.Slides)
{
    // TODO...
}

I hope this helps.

Regards,
Mario