Suppose there's a ppt file containing multiple slides, say 8 slides in one pptx file. Is there any way of splitting this pptx file into 8 separate pptx files by #python-pptx#?
1 Answers
python-pptx
does not have direct API support for this. You can find some solutions that might work for you if you search on "python-pptx copy slide" or "python-pptx duplicate slide".
In general, the idea is to create a duplicate of each slide one-by-one in a new presentation. A slide is a collection of shapes, so the duplicate-slide operation comes down to a set of duplicate-shape operations.
Duplicating a shape is easy for simple shapes, but becomes more difficult when the shape is a picture and more difficult still when it is a chart or smart-art.
The various approaches you'll find address these challenges in different ways with varying levels of success, but depending on how complex the shapes are on your particular presentation, you may be able to get the job done.

- 26,423
- 5
- 54
- 80