Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to catch event onclick when user click on a PowerPoint VBA but

995 views
Skip to first unread message

Bin

unread,
Nov 26, 2009, 10:21:01 AM11/26/09
to
Hi all.

You can visit this link : http://www.vbforums.com/showthread.php?t=510375

Like that application, I try to show a PPT file within a form by using
FindWindow() and SetParent() Function of "user32.dll" by C#. I can catch
events such as: begin show, end show, next slide, next, previous, next
build... by build functions to handle that events (for a object of
Micorosoft.Office.Interop.PowerPoint.SlideShowWindow) . It works ok. But if
slide has a VBA button (to run a marco or show animation ...) or has a video
clip and you need to click on it to play, I can not catch onlick event for
that object/shapes. I need to know what shape/object on slide is clicked when
slide is showing. It seem as PPT do not support that event? Please help me.

Thank you so much for your help.

Regards.

Bin.

Steve Rindsberg

unread,
Nov 26, 2009, 11:13:48 AM11/26/09
to

There's a selection change event but you can't use that during a slide show
because nothing can be selected in slide show view.

But if you give the shapes a Run Macro setting and have it run a macro something
like this, you can identify the shape:

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

Instead of a message box, the macro might be able to do something else to
communicate with your app.

==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


Bin

unread,
Nov 27, 2009, 12:39:01 AM11/27/09
to
Thanks Steve Rindsberg. But can you tell me how to do it with C#? My app open
a PPT file and show it. I have to loop all shapes in slide and add this
macro?Can you give me an example?

Thanks so much.

Regards,

Bin

Steve Rindsberg

unread,
Nov 27, 2009, 11:49:33 AM11/27/09
to
In article <F1F8A75B-74E4-4A93...@microsoft.com>, Bin wrote:
> Thanks Steve Rindsberg. But can you tell me how to do it with C#?

I'm afraid not ... I don't use C#.

> My app open
> a PPT file and show it. I have to loop all shapes in slide and add this
> macro?Can you give me an example?
>
> Thanks so much.
>
> Regards,
>
> Bin

0 new messages