Merge PPTM files in Python
Combine macro-enabled PowerPoint presentations with Aspose.Slides for Python via .NET. Microsoft PowerPoint and OpenOffice are not required.
Merge PPTM in Python
Aspose.Slides for Python via .NET
lets you merge PPTM presentations by cloning slides from a source Presentation into a destination Presentation. The cloned slides retain their layouts, shapes, styles, text, formatting, comments, and animations. Save the destination presentation with SaveFormat.PPTM to create a single macro-enabled PowerPoint file.
Merge PPTM files using Python
Clone each source slide with SlideCollection.add_clone, then call Presentation.save with SaveFormat.PPTM.
Python code to merge PPTM files into a single presentation
with slides.Presentation("presentation1.pptm") as destination_presentation:
with slides.Presentation("presentation2.pptm") as source_presentation:
for slide in source_presentation.slides:
destination_presentation.slides.add_clone(slide)
destination_presentation.save("merged_presentation.pptm", slides.export.SaveFormat.PPTM)
How to merge PPTM using Aspose.Slides for Python API
Follow these steps to merge two PPTM files and save the result as a single PPTM presentation in Python.
Install Aspose.Slides for Python via .NET .
Import the
aspose.slidespackage.Open the destination and source PPTM files as
Presentationinstances.Clone each source slide by using
SlideCollection.add_clone.Save the merged presentation with
Presentation.saveandSaveFormat.PPTM.
Export PPTM to Other Supported Formats
You can also merge PPTM files and export the result to other supported formats.