M
Mike M.
I am testing an addin to do the following:
Public WithEvents PPTEvent As Application
' See if I can get events from this object
Public WithEvents wmpObject As WindowsMediaPlayer
1. In SlideShowNextSlide, detect a Windows Media Player shape on a slide.
2. Set slide.SlideShowTransition.AdvanceOnTime = msoFalse
3. Set a reference to the WMP object and catch it's events.
4. In the WMP PlayStateChange event catch the wmppsStopped event and advance
the slide.
This works intermittently, sometimes the video clip doesn't start
automatically. Also, I don't want to leave the wmpObject set because I
think it will leak memory. I tried setting it to nothing but that causes PPT
to crash when the slide show finishes. I have also read some warnings about
doing anything in the WMP event functions that affects the object's state.
I think advancing the slide probably does that.
I am going to investigate using the Windows timer API to set a timer,
reacquire the WMP object and check it's state to see how that does. I don't
think it is as efficient as using the player object events though.
Anyone messed around with this before and has any suggestions to offer?
TIA
Public WithEvents PPTEvent As Application
' See if I can get events from this object
Public WithEvents wmpObject As WindowsMediaPlayer
1. In SlideShowNextSlide, detect a Windows Media Player shape on a slide.
2. Set slide.SlideShowTransition.AdvanceOnTime = msoFalse
3. Set a reference to the WMP object and catch it's events.
4. In the WMP PlayStateChange event catch the wmppsStopped event and advance
the slide.
This works intermittently, sometimes the video clip doesn't start
automatically. Also, I don't want to leave the wmpObject set because I
think it will leak memory. I tried setting it to nothing but that causes PPT
to crash when the slide show finishes. I have also read some warnings about
doing anything in the WMP event functions that affects the object's state.
I think advancing the slide probably does that.
I am going to investigate using the Windows timer API to set a timer,
reacquire the WMP object and check it's state to see how that does. I don't
think it is as efficient as using the player object events though.
Anyone messed around with this before and has any suggestions to offer?
TIA