Share via

PowerPoint Shape Click Event?

Anonymous
2010-07-12T13:49:42+00:00

I'm trying to write a shared add-in for PowerPoint 2003 using visual studio 2010. So far I've managed to add code in my plug-in that will react to slide changes (via SlideShowNextSlide event) which is great. But now I'm wondering if I can find a way to get my code to react to clicking on a shape during a presentation and have it do something. In other words, like the "Action Settings", but running the code inside my add-in (to do something other than playing a sound, linking to another slide, run a macro, or running an external program).

Up until now, I've used the action settings to run an external console app to do stuff. The downside to this solution is that the communication with the console app is only one direction. I can start the console app, but the presentation is indifferent to what it's doing. It also adds a dependency on the console app being installed and in the same location, which is a pain.

Is there a way to do this? Shapes don't seem to have a "Click" event that I can hook into.

Any ideas? Or is this a dead-end?

Microsoft 365 and Office | PowerPoint | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2010-07-12T15:40:44+00:00

    Thanks. I would really prefer to avoid macros since it means first adding code to my add-in to check for the existence of the macro in the current presentation and insert it if it doesn't exist (and I don't know how to do that, or if it's even possible), and then the macro itself is potentially visible to the user and reveals internal details of my add-in.

    Is there any other way?

    And, out of curiosity, does any of the newer versions of PowerPoint have this functionality?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2010-07-12T14:26:55+00:00

    Hi,

    You are right there are no events for shape click on an application level. Trigger  your code thru macro is the best bet -http://skp.mvps.org/ppt00040.htm#2

    Regards,

    Shyam Pillai

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2010-07-13T11:19:54+00:00

    I manage to get a result using the WindowSelectionChange(ByVal Sel As PowerPoint.Selection) event. But this only works in Edit mode.

    If you want something during SlideShow, a workaround would be add an exit animation (disappear) followed by an entrance animation (appear). This means the shape won't actually do anything visually, but the NextClick events fire which allows you to grab the shape reference.

    James

    Edit: Of course, with more than one shape, the NextClick wouldn't tell you which one was clicked, but I suppose you could get the mouse position and work it out. Perhaps not a workable solution after all.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-07-12T18:52:28+00:00

    Thanks anyway. It seem silly that the only way to do something during a slide transition is through code, but you can't do anything with a shape click in code (other than via a presentation specific macro).

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2010-07-12T15:56:48+00:00

    No, the newer versions do not have this functionality.

    Regards,

    Shyam

    Was this answer helpful?

    0 comments No comments