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.

  1. Install Aspose.Slides for Python via .NET with pip install aspose.slides.

  2. Load the destination PPT file into a Presentation instance.

  3. Load the source PPT file into another Presentation instance.

  4. Clone each source slide into the destination presentation with the add_clone method.

  5. Call save with SaveFormat.PPT to write the merged presentation to a PPT file.