Edit PPSM Files in C#

Edit PPSM presentations in C# using server-side Aspose.Slides for .NET APIs.

Edit PPSM File Using C#

Use Aspose.Slides for .NET to load a PPSM macro-enabled slide show, update slide content, and save the result. Install the package from NuGet or run the following command in the Package Manager Console.

Package Manager Console Command

PM> Install-Package Aspose.Slides.NET

Edit PPSM Files - C#

using var presentation = new Presentation("document.ppsm");
var slide = presentation.Slides[0];

if (slide.Shapes[0] is IAutoShape shape && shape.TextFrame is not null)
{
    shape.TextFrame.Text = "New text";
}

presentation.Save("document.ppsm", SaveFormat.Ppsm);

Steps for Editing PPSM Files in C#

Basic document editing with Aspose.Slides for .NET can be done with a few lines of C# code.

  1. Load the PPSM file with a Presentation object.
  2. Access the target slide and shape through variables.
  3. Update the text through TextFrame.
  4. Save the edited presentation with SaveFormat.Ppsm.

System Requirements

Before executing the code below, make sure that you have the following prerequisites.

  • A supported operating system with .NET or Mono installed.
  • A development environment such as Microsoft Visual Studio.
  • Aspose.Slides for .NET referenced in your project.

Built with Aspose.Slides

Edit PPTX Files Online

The free Aspose.Slides Editor app is built with Aspose.Slides for .NET, the same API as the code above. Open it and see what the API can do with your own PPTX files.

  • Runs in your browser, nothing to install.
  • See how Aspose.Slides handles your files before you write code.
  • Upload your PPTX files and edit them instantly.
  • Save and download the edited file.

What is PPSM File Format?

Files with the PPSM extension are macro-enabled PowerPoint slide show files. They open as slide shows and can contain slides, multimedia, formatting, and macros.

Read More