# Convert PPTX to PPTM in Python

> Convert PPTX presentations to macro-enabled PowerPoint PPTM files in Python with Aspose.Slides for Python via Java.

Source: https://products.aspose.com/slides/python-java/conversion/pptx-to-pptm/
Updated: 2026-07-22



## Convert PPTX to PPTM in Python

[**Aspose.Slides for Python via Java**](/slides/python-java/) can load a macro-free PowerPoint presentation (PPTX) and save it as a macro-enabled Open XML presentation (PPTM). PPTM supports VBA projects, but selecting this output format does not add macros to a presentation that has none. Microsoft PowerPoint is not required.

## Convert PPTX to PPTM using Python

Create a `Presentation` from the PPTX file, then call `save` with `SaveFormat.Pptm`.

### Python code for converting PPTX to PPTM

```python
presentation = Presentation("presentation.pptx")
try:
    presentation.save("presentation.pptm", SaveFormat.Pptm)
finally:
    presentation.dispose()
```

## How to convert PPTX to PPTM in Python

Follow these steps to convert a PowerPoint presentation to the macro-enabled PPTM format.

Install [**Aspose.Slides for Python via Java**](https://docs.aspose.com/slides/python-java/installation/).

Configure the package and start the Java Virtual Machine in your application.

Open the source PPTX file with `Presentation`.

Call `save` with `SaveFormat.Pptm` to create the PPTM presentation.

## Convert PPTX to Other Supported Formats
