Convert PPSX to POTM in Python

Save a PowerPoint slide show as a macro-enabled Open XML presentation template.

Convert PPSX to POTM in Python

Aspose.Slides for Python via Java can load a PowerPoint Slide Show (.ppsx) and save it as a macro-enabled PowerPoint Template (.potm) without Microsoft PowerPoint. POTM is an Open XML template format that can store VBA projects; converting a macro-free PPSX file does not add a VBA project to the output.

The conversion retains presentation content such as slides, layouts, themes, and supported multimedia. Load the source file with Presentation, then call save with SaveFormat.Potm.

How to Convert PPSX to POTM in Python

Load the source PPSX file into a Presentation, then save it with SaveFormat.Potm.

Python code for converting PPSX to POTM

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

Steps to Convert PPSX to POTM in Python

The conversion loads the PowerPoint slide show and writes its content in the macro-enabled Open XML POTM template format.

  1. Install Aspose.Slides for Python via Java .

  2. Configure JPype and make the Aspose.Slides package available to your Python project.

  3. Create a Presentation from the source .ppsx file.

  4. Call save with SaveFormat.Potm and a .potm output path.