Compare Two PowerPoint Files in C#

Compare Two PowerPoint Files in C#

PPT/PPTX files are most widely used in business and educational organizations. These files are used to deliver various types of presentations. Moreover, you can insert rich media items and can set eye-catching layouts to make your presentation even more attractive and readable. However, manipulating a huge number of PPT files manually takes an immense amount of time. Therefore, we’ll use this C# PowerPoint library to compare two PowerPoint Files in C# programmatically.

We will cover the following points:

C# PowerPoint library

This library is lightweight and offers comprehensive documentation regarding installation. Therefore, you can either download this C# PowerPoint library or install it by running the following commands in the NuGet PM.

Install-Package Aspose.Slides.NET 

Compare two PowerPoint files in C#

You can use this powerful library to process and manipulate your presentation slides programmatically.

Please follow the steps and the code snippets mentioned here:

  1. Load the two PPTX files by creating an instance of the Presentation class.
  2. Access the Masters property that returns a list of all master slides that are defined in the presentation.
  3. Loop through all the slides of both PPTX files.
  4. Check if there is a match among the slides of both PPTX files by invoking the Equals method.

Copy & paste the following code into your main file:

Retrieve PowerPoint Slide properties programmatically

In addition, you may configure your API calls to meet your business requirements. This C# PowerPoints library comes up with a wide range of methods that you may check here.

However, you may follow the steps and the code snippet mentioned below:

  1. Get info about the presentation in the specified file by calling the GetPresentationInfo method.
  2. Invoke the ReadDocumentProperties method to get the document properties of binded presentation.
  3. Assign the document properties to the object of the IDocumentProperties.
  4. CreatedTime property will let you know about the date when a presentation was created.
  5. You can retrieve the subject of the PPTX file by accessing Subject property.
  6. Title property will extract the title information.

Get a Free License

You can avail a free temporary license to try the API without evaluation limitations.

Summing up

We may end this blog post here. We have demonstrated how to compare two PowerPoint files in C# programmatically. Above all, we also have gone through some advanced methods exposed by this C# PowerPoint library. Further, you may visit the documentation to know about other methods. Finally, please visit for the latest updates.

Ask a question

You can let us know about your questions or queries on our forum.


How do you compare two presentations and merge results in PowerPoint?

You can install this C# PowerPoint library to compare two PPTX files programmatically. Further, you may visit this link to know the code snippet.

See Also