PNG JPG BMP TIFF DOCX
Aspose.Slides for .NET

Edit PPTX Files in C#

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

Edit PPTX File Using C#

Use Aspose.Slides for .NET to load a PPTX presentation, 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 PPTX Files - C#

using var presentation = new Presentation("document.pptx");
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.pptx", SaveFormat.Pptx);
 

Steps for Editing PPTX Files in C#

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

  • Load the PPTX file with a Presentation object.

  • Access the target slide and shape through variables.

  • Update the text through TextFrame.

  • Save the edited presentation with SaveFormat.Pptx.

  • 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.
    Aspose.Slides for .NET can read, write, edit, and convert presentation files to PDF, XPS, HTML, TIFF, ODP, and other formats. It can create new presentations from scratch and update existing slides, shapes, text, and other presentation elements.

    Online PPTX Editor Live Demos

    Edit PPTX documents online with the Aspose.Slides Editor app.

      No need to download Aspose API.
      No need to write any code.
      Upload your PPTX files and edit them instantly.
      Save and download the edited file.

    PPTX What is PPTX File Format?

    Files with the PPTX extension use the Office Open XML presentation format. A PPTX file can contain slides with text, charts, images, formatting, animations, and other presentation content.

    Read More