0
votes

I was wondering if there was any way I could change the theme of an existing PowerPoint using Python-pptx.

I realise that the easiest way of inserting a specific theme of a powerpoint, you just open a "template powerpoint" with the theme in it. However, I want to automize converting themes of existing PowerPoints, I'm not creating new PowerPoints from scratch. You might say: just copy and paste slides into the PowerPoint with a specific theme. However, copy and pasting slides is extremely error-prone as well, seeing they work with slide indices which seem quite tricky. And I'm not even sure whether the pasted slides automatically assume the theme of the new document.

Therefore I was wondering if anyone knew of some kind of theme object I could call and change using Python-pptx? Thanks in advance

1

1 Answers

0
votes

The short answer is no. Implementing that would be a fairly big deal and there are no current plans to add it.

If you wanted to do that to several decks, you might explore using Visual Basic for Applications to do it in a Microsoft Windows environment. You might also explore using the win32com interface to control the PowerPoint application from Python, I think that also requires a Windows environment.