Home Products Customers Tips VBA OfficeOne on Mac Contact us

Event Generator 2.0

Microsoft PowerPoint 2000 and later versions support a lot of events. The handler for these events can only reside in add-ins. The free Event Generator add-in redirects these events to the presentations.

Event Generator add-in calls the following subroutines in all modules in the presentation when it receives the events from PowerPoint:

  • OnPresentationClose() - Called before the presentation is closed.
  • OnPresentationNewSlide() - Called when a new slide is created in the presentation.
  • OnPresentationOpen() - Called after the presentation is opened.
  • OnPresentationPrint() - Called when the presentation is printed.
  • OnPresentationSave() - Called when the presentation is saved.

  • OnSlideShowBegin() - Called when the slide show begins.
  • OnSlideShowEnd() - Called when the slide show ends.
  • OnSlideShowNextBuild() - Called upon mouse-click or timing animation, but before the animated object becomes visible.
  • OnSlideShowNextSlide() - Called immediately before the transition to the next slide. For the first slide, it occurs immediately after the OnSlideShowBegin() event.

  • OnWindowActivate() - Called when the presentation window activates.
  • OnWindowBeforeRightClick() - Called when the user clicks the right mouse button. It is called before the right-click context menu is shown. This handler can disable showing of the context handler.
  • OnWindowDeactivate() - Called when the presentation window deactivates.
  • OnWindowSelectionChange() - Called when the currently selected shape or slide changes.

They should be declared exactly as the following:

Sub OnPresentationClose(ByVal Pres As Presentation)
    MsgBox "OnPresentationClose: Presentation " + Pres.Name + " closed!"
End Sub

Sub OnPresentationNewSlide(ByVal Sld As Slide)
    MsgBox "OnPresentationNewSlide: New slide " + _
        Trim(Str(Sld.SlideID)) + "/" + Trim(Str(Sld.SlideIndex)) + " inserted"
End Sub

Sub OnPresentationOpen(ByVal Pres As Presentation)
    MsgBox "OnPresentationOpen: Presentation " + Pres.Name + " opened!"
End Sub

Sub OnPresentationPrint(ByVal Pres As Presentation)
    MsgBox "OnPresentationPrint: Presentation " + Pres.Name + " printed!"
End Sub

Sub OnPresentationSave(ByVal Pres As Presentation)
    MsgBox "OnPresentationSave: Presentation " + Pres.Name + " saved!"
End Sub

Sub OnSlideShowBegin(ByVal Wn As SlideShowWindow)
    MsgBox "OnSlideShowBegin: Beginning slide show: " + Wn.Presentation.Name
End Sub

Sub OnSlideShowEnd(ByVal Pres As Presentation)
    MsgBox "OnSlideShowEnd: Slide show ended: " + Pres.Name
End Sub

Sub OnSlideShowNextBuild(ByVal Wn As SlideShowWindow)
    MsgBox "OnSlideShowNextBuild: Showing next build: " + _
        Wn.Presentation.Name + ":" + Str(Wn.View.Slide.SlideID)
End Sub

Sub OnSlideShowNextSlide(ByVal Wn As SlideShowWindow)
    MsgBox "OnSlideShowNextSlide: Showing next slide: " + _
        Wn.Presentation.Name + ":" + Str(Wn.View.Slide.SlideID)
End Sub

Sub OnWindowActivate(ByVal Pres As Presentation, ByVal Wn As DocumentWindow)
    MsgBox "OnWindowActivate: " + Pres.Name
End Sub

Sub OnWindowBeforeRightClick(ByVal Sel As Selection, Cancel As Boolean)
    MsgBox "OnWindowBeforeRightClick: " + Sel.Parent
End Sub

Sub OnWindowDeactivate(ByVal Pres As Presentation, ByVal Wn As DocumentWindow)
    MsgBox "OnWindowDeactivate: " + Pres.Name
End Sub

Sub OnWindowSelectionChange(ByVal Sel As Selection)
    MsgBox "OnWindowSelectionChange: " + Sel.Parent
End Sub

Download

Event Generator is supported on Microsoft PowerPoint 2013 (32-bit, 64-bit), 2010 (32-bit, 64-bit), 2007, 2003, 2002 (XP) and 2000. Download the 465 KB installation executable from hereDownload. A sample PowerPoint presentation that contains event handlers for events fired by Event Generator is included in the installation.

Installation Instructions

  • Download and save EventGen20.zip.
  • Extract and execute EventGen20.exe and follow the instructions given at the end of the installation.

Quote Your Own Price

If you find Event Generator useful, you can make a contribution here for its maintenance and future releases. On that page, enter the amount that you wish to contribute in the Item price box and make the payment.


Home | Products | Tips | VBA | FAQ | Utilities | Disclaimer | Privacy Policy | Mac | Links | Contact us

Contact OfficeOne on email at officeone@officeoneonline.com. Copyright © 2001-2017 OfficeOne. All rights reserved.

page counter