Merge PPTM Files into a POT File in Python
Use Aspose.Slides for Python via .NET to combine PPTM presentations and save the merged slides as a POT file without Microsoft PowerPoint.
Merge PPTM to POT in Python
Aspose.Slides for Python via .NET
lets you combine PPTM presentations by cloning slides from a source presentation into a destination presentation. The
SlideCollection.add_clone
method copies each slide and its associated layout and master data as needed, preserving the source slide’s appearance. After adding the slides, use Presentation.save with SaveFormat.POT to create a single POT file.
Merge PPTM files to POT using Python
Open the destination and source PPTM files, clone each source slide into the destination presentation, and then save the result in POT format.
Python code to merge multiple PPTM files into one POT file
with slides.Presentation("presentation1.pptm") as destination_presentation:
with slides.Presentation("presentation2.pptm") as source_presentation:
for source_slide in source_presentation.slides:
destination_presentation.slides.add_clone(source_slide)
destination_presentation.save("merged.pot", slides.export.SaveFormat.POT)
How to merge PPTM to POT using Aspose.Slides for Python API
Follow these steps to merge two PPTM files and save the result as a POT file in Python.
Install Aspose.Slides for Python via .NET with
pip install aspose.slides.Import the
aspose.slidespackage and assign it theslidesalias in your Python source file.Open one PPTM file as the destination
Presentationand the other as the sourcePresentation.Iterate through the source slides and add each slide to the destination by calling
SlideCollection.add_clone.Call
Presentation.savewith the output file name andSaveFormat.POTto create the merged POT file.
Export PPTM to Other Supported Formats
You can also combine PPTM files and save the result in any of the formats listed below.