Merge PPSM Files into PPS in Python

Combine PowerPoint Macro-Enabled Show files and save the merged slides as a PPS slide show with a cross-platform Python API

Merge PPSM to PPS in Python

Aspose.Slides for Python via .NET lets you merge PowerPoint Macro-Enabled Show (PPSM) files by cloning slides from one Presentation into another. After combining the slides with SlideCollection.add_clone, call Presentation.save with SaveFormat.PPS to save the merged slides as a PowerPoint 97–2003 Show (PPS) file. Cloning slides does not merge VBA projects from the source files.

Merge PPSM Files into PPS Using Python

Open the destination and source PPSM slide shows, append a clone of each source slide, and save the merged slides as a PPS file.

Python code for merging PPSM files into a single PPS slide show

with slides.Presentation("destination.ppsm") as destination_presentation:
    with slides.Presentation("source.ppsm") as source_presentation:
        for slide in source_presentation.slides:
            destination_presentation.slides.add_clone(slide)

    destination_presentation.save("merged-slide-show.pps", slides.export.SaveFormat.PPS)

How to Merge PPSM Files into PPS with Aspose.Slides for Python

Follow these steps to merge two PPSM files and save the result as a single PPS slide show.

  1. Install Aspose.Slides for Python via .NET by following the installation guide .

    pip install aspose-slides
    

  2. Make the aspose.slides namespace available in your Python project.

  3. Open the destination and source PPSM files as Presentation instances.

  4. Iterate through the source slides and call SlideCollection.add_clone for each slide.

  5. Call Presentation.save with SaveFormat.PPS to save the merged slides as a single PPS slide show.