# Edit PPT in Python

> Add text and shapes to PPT presentations and save the edited files with Aspose.Slides for Python via .NET.

Source: https://products.aspose.com/slides/python-net/editor/ppt/
Updated: 2026-07-27



## Edit PPT using Aspose.Slides

[*Aspose.Slides for Python via .NET*](/slides/python-net/) lets you load PPT presentations, edit their slides, and save the changes without Microsoft PowerPoint. You can modify text and shapes or add new presentation elements programmatically.

## Edit PPT in Python

The following example opens a PPT presentation, adds a text-bearing shape to its first slide, and saves the edited presentation as a new PPT file.

### Python code for editing PPT

```python
with slides.Presentation("presentation.ppt") as presentation:
    slide = presentation.slides[0]
    text_shape = slide.shapes.add_auto_shape(
        slides.ShapeType.RECTANGLE, 10, 10, 300, 50)
    text_shape.text_frame.text = "New text"

    presentation.save("edited-presentation.ppt", slides.export.SaveFormat.PPT)
```

## How to edit PPT in Python

Install Aspose.Slides for Python via .NET by following the [installation guide](https://docs.aspose.com/slides/python-net/installation/).

Open the source PPT file with `Presentation`.

Access the target slide through a `slide` variable.

Call `ShapeCollection.add_auto_shape` to add a rectangle to the slide.

Set the shape's `text_frame.text` value.

Call `Presentation.save` with `SaveFormat.PPT` to write the edited presentation.

## Edit other files
