I have code which runs two different ppt files in an axWebBrowser that works for Powerpoint 2003 but not Powerpoint 2007. In Powerpoint 2003, the NavigateComplete2 and DocumentComplete events fire off after each slide is displayed. The code simply counts down the slides and knows when to kill the current slideshow and start the next. In Powerpoint 2007, the NavigateComplete2 and DocumentComplete events only fire once. They fire when the ppt file finishes loading, which is before the slides finish displaying. Is there a way to know when the slideshow completes with Powerpoint 2007 Any help is greatly appreciated.


Re: .NET Base Class Library Using axWebBrowser to display Powerpoint 2007

Inbar Gazit - MSFT

Use the Application.SlideShowEnd Event

Occurs after a slide show ends, immediately after the last SlideShowNextSlide event occurs.

Version Information
Version Added: PowerPoint 2007


expression An expression that returns a Application object.


Name Required/Optional Data Type Description
Pres Required Presentation The presentation closed when this event occurs.


The SlideShowEnd event always occurs before a slide show ends if the SlideShowBegin event has occurred. You can use the SlideShowEnd event to return any property settings and variable initializations that occur in the SlideShowBegin event to their original settings.

For information about using events with the Application object, see How to: Use Events with the Application Object.


This example turns off the entry effect and automatic advance timing slide show transition effects for slides one through four at the end of the slide show. It also sets the slides to advance manually.

Visual Basic for Applications
Private Sub App_SlideShowEnd(ByVal Pres As Presentation)
  With Pres.Slides.Range(Array(1, 4)) _
    .EntryEffect = ppEffectNone
    .AdvanceOnTime = msoFalse
  End With

  With Pres.SlideShowSettings
    .AdvanceMode = ppSlideShowManualAdvance
  End With
End Sub

Re: .NET Base Class Library Using axWebBrowser to display Powerpoint 2007


Is there a way to access the Powerpoint.Application object contained in the axWebBrowser I can't access it to trap the SlideShowEnd event. I need this code to be compatible with Powerpoint 2003 also and it looks like this would only work for Powerpoint 2007. Any thoughts Thanks!