Convert PPTM to POTM in Python

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

Convert PPTM to POTM in Python

Aspose.Slides for Python via Java can load a macro-enabled PowerPoint presentation (.pptm) and save it as a macro-enabled PowerPoint template (.potm) without Microsoft PowerPoint. The conversion retains supported slide content, layouts, and formatting in the target Open XML format. Because POTM is macro-enabled, supported VBA project data can remain in the output.

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

Convert PPTM to POTM using Python

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

Python tutorial for converting PPTM into POTM

presentation = Presentation("presentation.pptm")
try:
    presentation.save("presentation.potm", SaveFormat.Potm)
finally:
    presentation.dispose()

How to convert PPTM to POTM in Python

Follow these steps to save a PowerPoint PPTM presentation as a macro-enabled 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.Potm and a .potm output path.