Convert PPTM to POTX in Python

Save a macro-enabled PowerPoint presentation as a macro-free PowerPoint template with Aspose.Slides for Python via Java.

Convert PPTM to POTX in Python

Aspose.Slides for Python via Java can load a macro-enabled PowerPoint presentation (.pptm) and save it as a PowerPoint Open XML template (.potx) without Microsoft PowerPoint. The conversion retains supported slide content, layouts, and formatting. POTX is a macro-free format, so the source presentation’s VBA project is not included in the output.

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

Convert PPTM to POTX using Python

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

Python tutorial for converting PPTM into POTX

presentation = Presentation("presentation.pptm")
try:
    presentation.save("presentation.potx", SaveFormat.Potx)
finally:
    presentation.dispose()

How to convert PPTM to POTX in Python

Follow these steps to save a PowerPoint PPTM presentation as a macro-free PowerPoint template.

  1. Install Aspose.Slides for Python via Java .

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

  3. Open the source PPTM file with Presentation.

  4. Call save with SaveFormat.Potx and a .potx output path.