GroupDocs.Merger for Python via .NET makes it easy to combine multiple PowerPoint presentations into a single file programmatically. All slides, shapes, animations, embedded media, and other content are preserved — no Microsoft PowerPoint or third-party desktop software required.
Common presentation file extensions include PPTX, PPT, PPSX, and PPS. PPTX is the default XML-based format introduced with Microsoft Office 2007; PPT is the older binary format supported by earlier versions of PowerPoint.
Steps to merge PPTX files
Create an instance of the Merger class and pass the path to the first (base) PPTX file.
Call merger.join() with the path to each additional PPTX file to append.
Call merger.save() with the desired output path to write the merged file.
fromgroupdocs.mergerimportMergerdefmerge_powerpoint_documents():# Load the first presentation as the merge basewithMerger("./input.pptx")asmerger:# Append the second PowerPoint presentationmerger.join("./input2.pptx")# Save the combined presentationmerger.save("./output.pptx")if__name__=="__main__":merge_powerpoint_documents()
input.pptx is a sample file used in this example. Click here to download it.
input2.pptx is a sample file used in this example. Click here to download it.