Convert PPT to PPSM in Python

Save a legacy PowerPoint presentation in the macro-enabled Open XML PPSM format with Aspose.Slides for Python via Java.

Convert PPT to PPSM in Python

Aspose.Slides for Python via Java can load a legacy PowerPoint presentation (.ppt) and save it in the macro-enabled Open XML PPSM format without Microsoft PowerPoint. PPSM files can store VBA macros; converting a source file does not create new macros.

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

Convert PPT to PPSM using Python

Create a Presentation from the source PPT file, then call save with SaveFormat.Ppsm.

Python code for converting PPT to PPSM

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

How to convert PPT to PPSM in Python

Follow these steps to save a PowerPoint PPT presentation in the macro-enabled Open XML PPSM format.

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

  4. Call save with SaveFormat.Ppsm and a .ppsm output path.