Merge PPTX Files into POTX in Python
Combine PowerPoint presentations and save the result as a POTX file with a fast, cross-platform Python API. Microsoft PowerPoint is not required.
Merge PPTX to POTX in Python
Aspose.Slides for Python via .NET
is a Python library for creating, editing, and converting presentation files. To merge PPTX presentations, clone each slide from a source Presentation into a destination presentation by calling
add_clone
on its slides collection. Cloned slides retain their shapes, styles, text, formatting, comments, and animations. The combined presentation can then be saved as a POTX file.
Merge PPTX files to POTX using Python
Clone each slide from the source presentation into the destination presentation, then save the combined presentation in POTX format.
Python code to merge multiple PPTX files into one POTX file
with slides.Presentation("presentation1.pptx") as destination_presentation:
with slides.Presentation("presentation2.pptx") as source_presentation:
for slide in source_presentation.slides:
destination_presentation.slides.add_clone(slide)
destination_presentation.save("merged.potx", slides.export.SaveFormat.POTX)
How to merge PPTX to POTX using Aspose.Slides for Python API
Follow these steps to merge two PPTX files and save the result as POTX in Python.
Install Aspose.Slides for Python via .NET with
pip install aspose-slides.Load the first
PPTXfile into the destinationPresentation, and load the secondPPTXfile into the sourcePresentation.Iterate through the source presentation’s
slidescollection.Clone each source
Slideinto the destination presentation by callingadd_clone.Call
Presentation.savewithSaveFormat.POTXto write the merged presentation to aPOTXfile.
Export PPTX to Other Supported Formats
You can also combine PPTX presentations and save the result in other supported formats.