Merge PowerPoint Presentations

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

  1. Create an instance of the Merger class and pass the path to the first (base) PPTX file.
  2. Call merger.join() with the path to each additional PPTX file to append.
  3. Call merger.save() with the desired output path to write the merged file.
from groupdocs.merger import Merger

def merge_powerpoint_documents():
    # Load the first presentation as the merge base
    with Merger("./input.pptx") as merger:
        # Append the second PowerPoint presentation
        merger.join("./input2.pptx")
        # Save the combined presentation
        merger.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.

Binary file (PPTX, 88 KB)

Download full output

Explanation

  • Load base document: Merger("./input.pptx") opens the first presentation as the merge base inside a context manager.
  • Append second document: merger.join("./input2.pptx") appends all slides from the second file. Call join again for each additional file.
  • Save result: merger.save("./output.pptx") writes the merged presentation to disk.

Merge PowerPoint Live Demo

GroupDocs.Merger for Python via .NET provides an online PowerPoint Merger App, which allows you to try it for free and check its quality and accuracy.

API reference

  • Merger — main class; join, save methods.

See also