Edit PPT in Python

High-speed and cross-platform Python library for editing PPT using Python code

Edit PPT using Aspose.Slides

Aspose.Slides for Python via .NET is a powerful Python library used to manipulate and edit presentations. You can edit a PPT presentation by adding a new line of text to it.

Edit PPT in Python

Using Aspose.Slides for Python via .NET , you can add a new line of text to a PPT document with just a few lines of code.

Python code for editing PPT


import aspose.slides as slides

with slides.Presentation("pres.ppt") as pres:
    shape = pres.slides[0].shapes.add_auto_shape(slides.ShapeType.RECTANGLE, 10, 10, 100, 50)
    shape.text_frame.text = "New text"

    pres.save("pres.ppt", slides.export.SaveFormat.PPT)

How to edit PPT in Python

  1. Install Aspose.Slides for Python via .NET. See Installation .

  2. Add the library as a reference in your project.

  3. Create an instance of the Presentation class.

  4. Load the PPT presentation you want to edit.

  5. Add a new line of text.

  6. Save the changed PowerPoint file.

Edit other files

You can also edit files in other formats