XDoc.PowerPoint
Features
Tech Specs
How-to C#
Pricing

C# PowerPoint Library
C# PowerPoint - Merge PowerPoint Documents in C#.NET


Provide C# Demo Codes for Merging and Appending PowerPoint Document



RasterEdge C#.NET PowerPoint document merging toolkit (XDoc.PowerPoint) is designed to help .NET developers combine PowerPoint document files created by different users to one PowerPoint file. Thus, C#.NET PowerPoint document merge library control can be counted as an efficient .NET doc solution for keeping PowerPoint document files organized.

This C# .NET PowerPoint document merging control is written in managed C# code and compatible with all .NET developing platforms, like ASP.NET web application and Windows Forms project. Using this PowerPoint document concatenating library SDK, C# developers can easily merge and append one PowerPoint document to another PowerPoint document file, and choose to create a new PowerPoint file in .NET class application.

Besides C#.NET PowerPoint document merging function, XDoc.PowerPoint, a professional third-party .NET document imaging toolkit, also offers other advanced PowerPoint document page processing and manipulating functions, such as PowerPoint page insertion, PowerPoint page deleting, PowerPoint document splitting, PowerPoint page reordering and PowerPoint page image and text extraction. Remarkably, all those C#.NET PowerPoint document page processing functions can be implemented independently, without using any Adobe-related software.

Our .NET PowerPoint SDK empowers C# programmers to easily merge and append PowerPoint files with mature APIs. To be more specific, two or more input PowerPoint documents can be merged and appended together according to its loading sequence, and then saved and output as a single PowerPoint with user-defined location.


How to merge, append Microsoft Office PowerPoint document using C#?

  1. Download XDoc.PowerPoint C# PPTX document library
  2. Install C# PPTX library to merge, combine Microsoft PowerPoint files in .NET applications
  3. Step by Step Tutorial












Combine and Merge Multiple PowerPoint Files into One Using C#

This part illustrates how to combine three PowerPoint files into a new file in C# application. You may also combine more PowerPoint documents together.

String inputFilePath1 = Program.RootPath + "\\" + "1.pptx";
String inputFilePath2 = Program.RootPath + "\\" + "2.pptx";
String inputFilePath3 = Program.RootPath + "\\" + "3.pptx";
String outputFilePath = Program.RootPath + "\\" + "Output.pptx";
String[] inputFilePaths = new String[3] { inputFilePath1, inputFilePath2, inputFilePath3 };

// Combine three PowerPoint files and output.
PPTXDocument.CombineDocument(inputFilePaths, outputFilePath);


Append PowerPoint Document in C#

In addition, C# users can append a PowerPoint file to the end of a current PowerPoint document and combine to a single PowerPoint file.

//  get PPTXDocument object from one file
String inputFilePath1 = Program.RootPath + "\\" + "1.pptx";
PPTXDocument doc1 = new PPTXDocument(inputFilePath1);
//  get XLSXDocument object from another file
String inputFilePath2 = Program.RootPath + "\\" + "2.pptx";
PPTXDocument doc2 = new PPTXDocument(inputFilePath2);

//  append the 2nd document
doc1.AppendDocument(doc2);

//  save the document
String outputFilePath = Program.RootPath + "\\" + "Output.pptx";
doc1.Save(outputFilePath);