Merge PPT files in Python
Use a fast, cross-platform Python API to create, merge, inspect, and convert Microsoft PowerPoint and OpenDocument presentations without installing Microsoft PowerPoint or OpenOffice.
Merge PPT in Python
Aspose.Slides for Python via .NET is a Python library for creating, editing, and converting presentation files. To combine PPT presentations, clone the slides from each source presentation into a destination presentation. The cloned slides retain their content and formatting, and the merged presentation can be saved as a single PPT file.
Merge PPT files using Python
Clone the slides from the source PPT presentation into the destination presentation, and then save the merged result as PPT.
Python code to merge multiple PPT files into one file
with slides.Presentation("presentation1.ppt") as destination_presentation:
with slides.Presentation("presentation2.ppt") as source_presentation:
for source_slide in source_presentation.slides:
destination_presentation.slides.add_clone(source_slide)
destination_presentation.save("presentation.ppt", slides.export.SaveFormat.PPT)
How to merge PPT using Aspose.Slides for Python API
Follow these steps to merge two PPT files and save the result as PPT in Python.
Install Aspose.Slides for Python via .NET with
pip install aspose.slides.Load the destination PPT file into a
Presentationinstance.Load the source PPT file into another
Presentationinstance.Clone each source slide into the destination presentation with the
add_clonemethod.Call
savewithSaveFormat.PPTto write the merged presentation to a PPT file.
Export PPT to Other Supported Formats
You can also combine PPT presentations and save the result in other supported formats.