Convert OTP Templates to PPTM in Python

Save an OTP presentation template in the macro-enabled PowerPoint PPTM format with Aspose.Slides for Python via Java.

Convert OTP to PPTM in Python

Aspose.Slides for Python via Java can load an OpenDocument Presentation Template (OTP) and save it in the macro-enabled PowerPoint PPTM format. PPTM supports VBA projects, but converting an OTP file does not add macros to the presentation. The conversion does not require Microsoft PowerPoint, LibreOffice, or OpenOffice.

Convert OTP to PPTM using Python

Create a Presentation from the OTP file and call save with SaveFormat.Pptm to create the PPTM file.

Python code for converting OTP to PPTM

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

How to convert OTP to PPTM in Python

Follow these steps to save an OpenDocument presentation template in the macro-enabled PowerPoint PPTM 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 OTP file with Presentation.

  4. Call save with SaveFormat.Pptm to write the PPTM file.