How to convert a Legacy PPT Presentation to PPTX in C# .NET Framework

Outdated file formats can really take the wind out of your sails, am I right? If you need a quick method of implementing a solution to this problem, we have just the thing for you. A few minutes with our API setup and you will be well on your way.

We can begin by installing our client with this command, to be used in Package Manager’s console.

Install-Package Cloudmersive.APIClient.NET.DocumentAndDataConvert -Version 2.2.0

The next step is to call our function, as we have laid out below.

using System;using System.Diagnostics;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Api;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Client;using Cloudmersive.APIClient.NET.DocumentAndDataConvert.Model;namespace Example{public class ConvertDocumentPptToPptxExample{public void main(){// Configure API key authorization: ApikeyConfiguration.Default.AddApiKey("Apikey", "YOUR_API_KEY");// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed// Configuration.Default.AddApiKeyPrefix("Apikey", "Bearer");var apiInstance = new ConvertDocumentApi();var inputFile = new System.IO.Stream(); // System.IO.Stream | Input file to perform the operation on.try{// Convert PowerPoint PPT (97-03) Presentation to PPTXbyte[] result = apiInstance.ConvertDocumentPptToPptx(inputFile);Debug.WriteLine(result);}catch (Exception e){Debug.Print("Exception when calling ConvertDocumentApi.ConvertDocumentPptToPptx: " + e.Message );}}}}

So with that out of the way, the only remaining task is to input any PPT files that need to be updated. Very simple.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.