Convert PPTM to OTP in Python

Save a macro-enabled PowerPoint presentation as an OpenDocument Presentation Template with Aspose.Slides for Python via Java.

Convert PPTM to OTP in Python

Aspose.Slides for Python via Java can load a macro-enabled PowerPoint presentation (.pptm) and save it as an OpenDocument Presentation Template (.otp) without Microsoft PowerPoint. The resulting file can be used in applications that support the OpenDocument template format. The OTP output does not retain the PPTM file’s VBA project.

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

Convert PPTM to OTP using Python

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

Python code for converting PPTM to OTP

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

How to convert PPTM to OTP in Python

Follow these steps to save a PowerPoint PPTM presentation as an OpenDocument Presentation 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.Otp and an .otp output path.