user3017043
user3017043

Reputation: 13

handle Powerpoint shape click event in c# code

I want to handle a powerpoint shape's click event in slide show mode. I want to write event handler in a C# vsto addin. Please help me I am stuck in this as in google search I am not able to find any answer to this.

Upvotes: 1

Views: 1659

Answers (1)

Steve Rindsberg
Steve Rindsberg

Reputation: 14809

In normal view, you could respond to the Selection Changed event to determine whether a particular shape had been clicked, but you can't select anything in slide show view.

But you can assign an action setting to a shape, make it a Run Macro action and have it call a bit of VBA code within the presentation, for example:

Sub AndThenHeClickedMe(oSh as Shape)
  MsgBox "You clicked " & oSh.Name
End Sub

Your VBA code could possibly call a DLL that you provide as well, so you don't need to write all of the following code in VBA if you don't wish to.

Upvotes: 1

Related Questions