Open and save Presentation in UWP

6 Jul 20233 minutes to read

Syncfusion PowerPoint is a UWP PowerPoint library used to create, read, edit and convert PowerPoint documents programmatically without Microsoft PowerPoint or interop dependencies. Using this library, you can open and save a Presentation in UWP.

Steps to open and save PowerPoint Presentation programmatically

Step 1: Create a new C# UWP application project.

Create UWP project

Step 2: Install the Syncfusion.Presentation.UWP NuGet package as reference to your .NET Standard applications from

Install Syncfusion.Presentation.UWP Nuget Package


Starting with v16.2.0.x, if you reference Syncfusion assemblies from trial setup or from the NuGet feed, you also have to add “Syncfusion.Licensing” assembly reference and include a license key in your projects. Please refer to this link to know about registering Syncfusion license key in your application to use our components.

Step 3: Add a new button in the MainPage.xaml as shown below.

    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Button x:Name="button" Content="Open and Save Presentation" Click="OnButtonClicked" HorizontalAlignment="Center" VerticalAlignment="Center"/>

Step 4: Include the following namespaces in the MainPage.xaml.cs file.

using Syncfusion.Presentation;

Step 5: Include the below code snippet in the click event of the button in MainPage.xaml.cs, to Open an existing PowerPoint Presentation in UWP.

//"App" is the class of Portable project.
Assembly assembly = typeof(App).GetTypeInfo().Assembly;
//Open an existing PowerPoint presentation
IPresentation pptxDoc = Presentation.Open(assembly.GetManifestResourceStream("Read_and_edit_PowerPoint_presentation.Assets.Template.pptx"));

Step 6: Add below code snippet demonstrates accessing a shape from a slide and changing the text within it.

//Gets the first slide from the PowerPoint presentation
ISlide slide = pptxDoc.Slides[0];
//Gets the first shape of the slide
IShape shape = slide.Shapes[0] as IShape;
//Change the text of the shape
if (shape.TextBody.Text == "Company History")
    shape.TextBody.Text = "Company Profile";

Step 7: Add below code snippet to Save and close the presentation.

//Initializes FileSavePicker
FileSavePicker savePicker = new FileSavePicker();
savePicker.SuggestedStartLocation = PickerLocationId.Desktop;
savePicker.SuggestedFileName = "Result";
savePicker.FileTypeChoices.Add("PowerPoint Files", new List<string>() { ".pptx" });
//Creates a storage file from FileSavePicker
StorageFile storageFile = await savePicker.PickSaveFileAsync();
//Saves changes to the specified storage file
await pptxDoc.SaveAsync(storageFile);
//Close the PowerPoint presentation

You can download a complete working sample from GitHub.

By executing the program, you will get the PowerPoint document as follows.

UWP output PowerPoint document

Click here to explore the rich set of Syncfusion PowerPoint Library (Presentation) features.