We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

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.


How to merge two PowerPoint presentations in C#

  1. Install NuGet package: Install the Syncfusion.Presentation.Net.Core NuGet package in your project.
  2. Open source and destination file: Initialize two IPresentation objects for the passing the FileStream objects.
  3. Clone slides from source presentation: Use the Clone method of the ISlide interface to clone each slide.
  4. Merge to destination: Add each cloned slide to the IPresentation.
  5. Replace text: Iterate through each found text, using the GetAsOneTextPart method to obtain the found text as a single text part, and then replace the text.
  6. Save destination presentation: Save the IPresentation object to the FileStream object.

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);

Merge PowerPoint presentations

Merge slides

Clone specific slides from one presentation and seamlessly merge them into another, providing flexibility in slide management.

Merge multiple presentations

Effortlessly combine multiple presentations into a single cohesive presentation, streamlining content organization.

Paste options

Merge the slides by specifying the destination or source presentation theme for the slides.



Awards

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.

Scroll up icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon