Convert PPSX to PPSM in Python

Save a PowerPoint slide show in the macro-enabled Open XML Slide Show format.

Convert PPSX to PPSM in Python

Aspose.Slides for Python via Java can load a PowerPoint Slide Show (.ppsx) and save it as a macro-enabled PowerPoint Slide Show (.ppsm) without Microsoft PowerPoint. PPSM is an Open XML 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.Ppsm.

How to Convert PPSX to PPSM in Python

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

Python code for converting PPSX to PPSM

presentation = Presentation("presentation.ppsx")
try:
    presentation.save("presentation.ppsm", SaveFormat.Ppsm)
finally:
    presentation.dispose()

Steps to Convert PPSX to PPSM in Python

The conversion loads the PowerPoint slide show and writes its content in the macro-enabled Open XML PPSM 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.Ppsm and a .ppsm output path.