Convert POT Files to POTM in Python

Export a binary PowerPoint template as a macro-enabled Open XML template with Aspose.Slides for Python via Java.

Convert POT to POTM in Python

Aspose.Slides for Python via Java can load a binary PowerPoint template (POT) and export it as a macro-enabled Open XML template (POTM). The POTM format can store VBA macros, but converting a macro-free POT file does not add macros. Microsoft PowerPoint is not required.

Convert POT to POTM using Python

Create a Presentation from the POT file, then call save with SaveFormat.Potm.

Python code for converting POT to POTM

presentation = Presentation("presentation.pot")
try:
    presentation.save("presentation.potm", SaveFormat.Potm)
finally:
    presentation.dispose()

How to convert POT to POTM in Python

Follow these steps to export a POT file as a macro-enabled PowerPoint 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 POT file with Presentation.

  4. Call save with SaveFormat.Potm to create the POTM file.