# Convert PPTM to OTP in Python

> Convert PPTM files to OTP format in Python with Aspose.Slides for Python via Java.

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



## Convert PPTM to OTP in Python

[**Aspose.Slides for Python via Java**](/slides/python-java/) can load a macro-enabled PowerPoint presentation (`.pptm`) and save it as an OpenDocument Presentation Template (`.otp`) without Microsoft PowerPoint. The resulting file can be used in applications that support the OpenDocument template format. The OTP output does not retain the PPTM file's VBA project.

Load the source file with `Presentation`, then call `save` with `SaveFormat.Otp`.

## Convert PPTM to OTP using Python

Create a `Presentation` from the source PPTM file, then call `save` with `SaveFormat.Otp`.

### Python code for converting PPTM to OTP

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

## How to convert PPTM to OTP in Python

Follow these steps to save a PowerPoint PPTM presentation as an OpenDocument Presentation Template.

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 PPTM file with `Presentation`.

Call `save` with `SaveFormat.Otp` and an `.otp` output path.

## Convert PPTM to Other Supported Formats

- [PPTM TO PPTX](/slides/python-java/conversion/pptm-to-pptx/)
- [PPTM TO PPT](/slides/python-java/conversion/pptm-to-ppt/)
- [PPTM TO PDF](/slides/python-java/conversion/pptm-to-pdf/)
- [PPTM TO HTML](/slides/python-java/conversion/pptm-to-html/)
- [PPTM TO PNG](/slides/python-java/conversion/pptm-to-png/)
- [PPTM TO BMP](/slides/python-java/conversion/pptm-to-bmp/)
- [PPTM TO JPG](/slides/python-java/conversion/pptm-to-jpg/)
- [PPTM TO FODP](/slides/python-java/conversion/pptm-to-fodp/)
- [PPTM TO GIF](/slides/python-java/conversion/pptm-to-gif/)
- [PPTM TO ODP](/slides/python-java/conversion/pptm-to-odp/)
- [PPTM TO POT](/slides/python-java/conversion/pptm-to-pot/)
- [PPTM TO POTM](/slides/python-java/conversion/pptm-to-potm/)
- [PPTM TO POTX](/slides/python-java/conversion/pptm-to-potx/)
- [PPTM TO PPS](/slides/python-java/conversion/pptm-to-pps/)
- [PPTM TO PPSM](/slides/python-java/conversion/pptm-to-ppsm/)
- [PPTM TO PPSX](/slides/python-java/conversion/pptm-to-ppsx/)
- [PPTM TO SVG](/slides/python-java/conversion/pptm-to-svg/)
- [PPTM TO TIFF](/slides/python-java/conversion/pptm-to-tiff/)
