scanny / python-pptx

Create Open XML PowerPoint documents in Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run function on click

Patrick75010 opened this issue · comments

Is it possible to define one function and run it on click ?

That would have to be VBA. Unfortunately you can't inject VBA into a presentation using python-pptx. I seriously doubt you could inject it with your own code - as it's not plain text. (I'd love to be wrong on this.)

What I have done - and this might work for you - is put the VBA code in my template presentation. Then I've managed to call it on clicking on a shape. (My md2pptx code supports this approach. I don't think I did anything special to have the shape clickable other than what python-pptx already supports.)