Search code examples
javams-officepowerpoint

Copy PowerPoint Slides in Java (preferably)


I have a Java program in which I want to copy PowerPoint slides from one presentation into another. I have looked into the "Slides" API in Apache POI, but can't find any reference to a capability like that there.

Though the calling program will be Java, I'm open to the idea of the actual work being in another language. For example, I could run on Windows and call a COM component through JACOB or something.

How can I best achieve this? Also for clarification, I need to support both PPT and PPTX formats.


Solution

  • It turns out that PowerPoint's own COM API has a built-in method that makes this quite easy: InsertFromFile