From 8b9fa82be090195aeda53e9a93ad300ec993a320 Mon Sep 17 00:00:00 2001 From: Viswajith-SF4658 Date: Tue, 11 Aug 2026 18:34:38 +0530 Subject: [PATCH] Updated Github examples for split sections to powerpoint presentation --- .../Split-PowerPoint-by-sections/Program.cs | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Sections/Split-PowerPoint-by-Sections/.NET/Split-PowerPoint-by-sections/Program.cs b/Sections/Split-PowerPoint-by-Sections/.NET/Split-PowerPoint-by-sections/Program.cs index 72d86db1..256c7875 100644 --- a/Sections/Split-PowerPoint-by-Sections/.NET/Split-PowerPoint-by-sections/Program.cs +++ b/Sections/Split-PowerPoint-by-Sections/.NET/Split-PowerPoint-by-sections/Program.cs @@ -6,15 +6,17 @@ //Iterates through each section. foreach (ISection section in sourcePptx.Sections) { -    //Creates a destination PPTX document. Existing presentations can also be used here. -    IPresentation destinationPptx = Presentation.Create(); -    // Clone the slides from the section and move to new PPTX document. -    foreach (ISlide slide in section.Slides) -        destinationPptx.Slides.Add(slide.Clone(), PasteOptions.SourceFormatting, sourcePptx); -    //Saves the destination PPTX document. -    string outputPath = Path.Combine(Path.GetFullPath("Output"), section.Name + "_Slides.pptx"); - destinationPptx.Save(outputPath); -    destinationPptx.Close(); +  //Creates a destination PPTX document. Existing presentations can also be used here. +  IPresentation destinationPptx = Presentation.Create(); +  // Clone the slides from the section and move to new PPTX document. +  foreach (ISlide slide in section.Slides) +  { +  destinationPptx.Slides.Add(slide.Clone(), PasteOptions.SourceFormatting, sourcePptx); +  } +  //Saves the destination PPTX document. +  string outputPath = Path.Combine(Path.GetFullPath("Output"), section.Name + "_Slides.pptx"); + destinationPptx.Save(outputPath); + destinationPptx.Close(); } //Closes the PPTX document. sourcePptx.Close(); \ No newline at end of file