The Syncfusion .NET PowerPoint Library offers the powerful capability to merge or combine multiple PowerPoint presentations into a single presentation with just a few lines of code in C#, without Microsoft PowerPoint. It also allows for the merging of particular slides from one presentation to another.
Here is an example of how to merge two presentations in C# using the Syncfusion .NET PowerPoint Library.
//Open an existing source presentation.
using FileStream sourceStream = new FileStream("SourcePresentation.pptx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
using IPresentation sourcePresentation = Presentation.Open(sourceStream);
//Open an existing destination presentation.
using FileStream destinationStream = new FileStream("DestinationPresentation.pptx", FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
using IPresentation destinationPresentation = Presentation.Open(destinationStream);
//Iterate each slide in source and merge to presentation.
for(int i =0;i<sourcePresentation.Slides.Count;i++)
{
//Clone the slide of the source presentation.
ISlide clonedSlide = sourcePresentation.Slides[i].Clone();
//Merge the cloned slide into the destination presentation.
destinationPresentation.Slides.Add(clonedSlide, PasteOptions.UseDestinationTheme, sourcePresentation);
}
//Save the PowerPoint presentation.
using FileStream outputStream = new FileStream("Result.pptx"), FileMode.Create);
destinationPresentation.Save(outputStream);
Clone specific slides from one presentation and seamlessly merge them into another, providing flexibility in slide management.
Effortlessly combine multiple presentations into a single cohesive presentation, streamlining content organization.
Merge the slides by specifying the destination or source presentation theme for the slides.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.