Combining two or more presentations into a single one is just a few lines of code away. This article discusses different ways how to merge multiple PowerPoint presentations into a single one using C#. Further, it will also show how you can join specific slides of different presentations using a similar C# code.

The following topics are covered in this article:

.NET API to Merge Presentations

GroupDocs provides high-code automation APIs for merging similar and multiple types of documents. Along with merging PowerPoint files, it allows splitting documents, moving certain pages, and removing, swapping, or extracting pages from various documents using very little code.

I will be using its GroupDocs.Merger for .NET in the examples below. Before you proceed, you may get the API from either of the following options:

  1. Install or Update the package from NuGet Packages Gallery.
Install-Package GroupDocs.Merger
OR
Update-Package GroupDocs.Merger
  1. Download the MSI or DLLs from the downloads section.

How to Merge PowerPoint Presentations (PPT/PPTX) using C#

Combining two or more presentations is quite simple. The following steps show how to merge PPT or PPTX files within the .NET application using C#.

  • Load the first presentation using the Merger class.
  • Combine the second presentation using the Join method.
  • Keep joining more PPT or PPTX files using the same Join Method.
  • Save the merged presentations file using the Save method.

The following C# code snippet merges multiple PowerPoint presentations.

How to Merge Specific Presentation Slides using C#

You can also merge specific slides of multiple presentations. The following steps show how to merge specific presentation slides using C#.

  • Load the first presentation using the Merger class.
  • Select the slides to join using the JoinOptions class.
  • Now, combine both presentations using the Join method with prepared join options.
  • Save the merged presentation file using the Save method.

The following C# code snippet combines the selected slides of the presentations.

Free API License

You can get a free temporary license and merge your presentations without evaluation limitations.

Conclusion

To conclude, today you learned to merge two or more PPT files using C# within your .NET application. More specifically we combined whole presentations and then merged a few selected slides from the presentations. You can use the merging feature in your .NET applications to merge ppt files online.

Learn More & Get in Touch

In case you want to know more about the .NET Merger API by GroupDocs, visit: Documentation | API reference | GitHub Examples.

Contact us on the forum about any queries.

See Also