Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run function on click #976

Open
Patrick75010 opened this issue May 11, 2024 · 1 comment
Open

run function on click #976

Patrick75010 opened this issue May 11, 2024 · 1 comment

Comments

@Patrick75010
Copy link

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

@MartinPacker
Copy link

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants