This topic describes how to convert PPT to PPTX in C# with the help of very few lines of code. All the configuration details and runnable sample code is also part of this tutorial that can be used to develop a PPT to PPTX converter in C#. You will also get information to customize the loading of the source PPT file and save the PPTX file.
Steps to Convert PPT to PPTX in C#
- Configure the environment to add Aspose.Slides for .NET using the NuGet package manager for PPT to PPTX conversion
- Declare the LoadOptions class object
- Set the load format to PPT
- Set a password to open the PPT file
- Load the source PPT using the Presentation class with the specified load options
- Save the loaded presentation as PPTX
These steps guide us to change PPT to PPTX in C#. We need to specify the load format for the PPT file therefore, the LoadOptions class object is declared in the beginning as it contains the LoadFormat property that is set to PPT. If your PPT file is password protected, set the password also using the LoadFormat class object and then load the source PPT file for saving as a PPTX.
Code to transform PPT to PPTX in C#
This code assists in writing a basic PPT to PPTX converter software in C# where LoadOptions class also contains other properties like setting spreadsheet options to decide the formula calculation for charts etc., managing the loading of external resources, setting warning callbacks, and interruption token to name a few. You can also perform other advanced operations as well like modifying the loaded PPT file similar to MS PowerPoint before saving it as a PPTX.
This tutorial has taught us the process of converting a PPT to PPTX however if you want to learn other types of conversions like converting a presentation to a PDF, refer to the article on how to convert PowerPoint to PDF using C#.