Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling python script from PowerPoint/VBA

I'd like to be able to run Python scripts (that create slides and contents) from PowerPoint, just like an icon in an add-in. I saw that it's possible in Excel using a programm called ExcelPython and the Py scripts are called using VBA.

But for PowerPoint, any way ?

Many thanks

like image 494
Seraphyn Avatar asked Mar 25 '26 06:03

Seraphyn


1 Answers

As long as you can execute your script from the command line, it should be possible from PPT as well. Here's an example of starting Notepad with a filename as a command line parameter:

Sub CallExternalProgram()
    Shell "Notepad.exe newfile.txt"
End Sub

You'd have to supply the full path to the executable if it's not on the path.

like image 140
Steve Rindsberg Avatar answered Mar 27 '26 20:03

Steve Rindsberg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!