Hi all,
Thanks for reading.Iam trying to open a powerpoint presentation using VB and trap the events. Say switching of slides, open a presentation, presentation end etc.,
This I was able to do by creating a class wherein I will assign the events and assiging that instance of the class to this powerpoint presentation.
This is the code
VB Code:
'Class Module Public WithEvents App As Application Private Sub App_PresentationOpen(ByVal Pres As PowerPoint.Presentation) End Sub Private Sub App_SlideShowNextSlide(ByVal Wn As PowerPoint.SlideShowWindow) End Sub Private Sub App_WindowSelectionChange(ByVal Sel As PowerPoint.Selection) End Sub
And in the form
VB Code:
Dim X As New clsPres Set oPPTApp = New PowerPoint.Application Set X.App = oPPTApp
Now this code works perfect for the first slide, and it fails for the next one. Say, SlideShowNextSlide event works for the first time, thereafter it is failing to trap the events.
Can any one help, on how to trap the events through out the presentation?
Thnx,
Pres.




Reply With Quote