Convert POTM Files to OTP in Python

Export a macro-enabled PowerPoint template as an OpenDocument presentation template with Aspose.Slides for Python via Java.

Convert POTM to OTP in Python

Aspose.Slides for Python via Java can load a macro-enabled POTM file and save it as an OTP presentation template. The OTP output can be used as the basis for new OpenDocument presentations; VBA macros are not retained. Microsoft PowerPoint, LibreOffice, and OpenOffice are not required.

Convert POTM to OTP using Python

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

Python code for converting POTM to OTP

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

How to convert POTM to OTP in Python

Follow these steps to save a POTM file as an OTP 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 POTM file with Presentation.

  4. Call save with SaveFormat.Otp to create the OTP presentation template.