Convert PPSM Files to OTP in Python

Turn a macro-enabled PowerPoint slide show into an OpenDocument presentation template.

Convert PPSM to OTP in Python

Aspose.Slides for Python via Java can convert a macro-enabled PowerPoint slide show (.ppsm) to an OpenDocument Presentation Template (.otp). The OTP output can be used as the starting point for new OpenDocument presentations. Because OTP does not support VBA projects, macros are not retained.

Open the source file with Presentation and call save with SaveFormat.Otp. The conversion does not require Microsoft PowerPoint or LibreOffice.

How to Convert PPSM to OTP in Python

Create a Presentation from the source PPSM file and save it with SaveFormat.Otp.

Python code for converting PPSM to OTP

presentation = Presentation("presentation.ppsm")
try:
    presentation.save("presentation.otp", SaveFormat.Otp)
finally:
    presentation.dispose()

Steps to Convert PPSM to OTP in Python

The conversion loads the macro-enabled PowerPoint slide show and saves its design and content in the OTP 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 .ppsm file.

  4. Call save with SaveFormat.Otp and an .otp output path.