tags:

views:

94

answers:

1

Is there some kind of event which allows to run a macro any time one enters a slide or leave a slide ?

+3  A: 

SlideShowNextSlide or OnSlideShowPageChange

You can find the full list at http://officeone.mvps.org/vba/events_version.html

Code sample from http://msdn.microsoft.com/en-us/library/aa211571%28office.11%29.aspx

This example determines the slide position for the slide following the 
SlideShowNextSlide event. If  the next slide is slide three, the example changes 
the type of pointer to a pen and the pen color to red.

Private Sub App_SlideShowNextSlide(ByVal Wn As SlideShowWindow)

Dim Showpos As Integer

Showpos = Wn.View.CurrentShowPosition + 1


 If Showpos = 3 Then  
     With ActivePresentation.SlideShowSettings.Run.View
        .PointerColor.RGB = RGB(255, 0, 0)
        .PointerType = ppSlideShowPointerPen
     End With
  Else
     With ActivePresentation.SlideShowSettings.Run.View
        .PointerColor.RGB = RGB(0, 0, 0)
        .PointerType = ppSlideShowPointerArrow
     End With
  End If
End Sub
belisarius
That is just for entering. I don't know if there is an event on "leaving"
belisarius
I try to trigger it by executing this http://stackoverflow.com/questions/2979950/how-to-automatically-trigger-the-app-object-initialization-in-powerpoint in execution window but doesn't seem to work. Did I mischief something ?
Answered in the other question
belisarius