locked
Application.SlideShowNextSlide event sometimes not hit in PowerPoint 2010 RRS feed

  • Question

  • I have been working on a VSTO Addin that uses the Application.SlideShowNextSlide event in order to render something on the next slide that opens. This worked without a hitch when run against PowerPoint 2007, but with PowerPoint 2010 the event is never hit in some situations. Within a show if I click a hyperlink to another slide show that opens a new slide show window, then click a hyperlink to go back to the original slideshow the SlideShowNextSlide event is never hit. For some reason in PowerPoint 2010 if a slideshow is already open and a hyperlinked is clicked to go to that slideshow, PowerPoint will not fire off the SlideShowNextSlide event. I have tried adding every available PowerPoint 2007 and 2010 event to the VSTO Addin but none of the events are hit when visiting a slideshow that is already open. Has anyone else seen this behavior or know of a workaround?
    Monday, June 27, 2011 3:52 PM

All replies

  • Hi Urmda,

     

    Thanks for posting in the MSDN Forum.

     

    Would you please show me the steps to reproduce you issue?

     

    On my side I can see only one slide show window will be open and all of the slides will be shown one by one, these seem no chance to show two slides together. So I’m wondering about the mean of <<if a slideshow is already open and a hyperlinked is clicked go to the slideshow.>>.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 29, 2011 8:59 AM
  • The following is in VB.  You will have to make a VSTO Addin for Office 2010 with the following code in ThisAddin.vb:

     

    Public Class ThisAddIn
    
     
    
      Private Sub ThisAddIn_Startup() Handles Me.Startup
    
        AddHandler Application.SlideShowBegin, AddressOf Application_SlideShowBegin
    
        AddHandler Application.SlideShowNextSlide, AddressOf Application_SlideShowNextSlide
    
      End Sub
    
     
    
      Private Sub ThisAddIn_Shutdown() Handles Me.Shutdown
    
        RemoveHandler Application.SlideShowBegin, AddressOf Application_SlideShowBegin
    
        RemoveHandler Application.SlideShowNextSlide, AddressOf Application_SlideShowNextSlide
    
      End Sub
    
     
    
      Private Sub Application_SlideShowBegin(ByVal Wn As Microsoft.Office.Interop.PowerPoint.SlideShowWindow)
    
        System.Diagnostics.Debug.WriteLine("SlideShowBegin")
    
            MsgBox("Application.SlideShowBegin Event, " & Wn.Presentation.Name)
    
      End Sub
    
     
    
      Private Sub Application_SlideShowNextSlide(ByVal Wn As Microsoft.Office.Interop.PowerPoint.SlideShowWindow)
    
        System.Diagnostics.Debug.WriteLine("SlideShowNextSlide")
    
            MsgBox("Application.SlideShowNextSlide Event, " & Wn.Presentation.Name)
    
      End Sub
    
     
    
    End Class


    Then you will have to make 2 .ppsx shows that have a hyperlink to one another.  The problem occurs on a PowerPoint 2010 Installation.  Once you have built the above AddIn you can follow these steps:

     

    1. With a computer that has Office 2010 installed.
    2. Right click the AddIn project and select Debug->Start New Instance.
    3. When PowerPoint 2010 Opens up, Open one of the two slides you created and start the slideshow.
    4. SlideShowBegin and SlideShowNextSlide should both be hit when the slideshow displays.
    5. Click the hyperlink on the slide. The SlideShowBegin event should get hit, as well as the SlideShowNextSlide event.
    6. On the second slide that is opened click the hyperlink(which is pointing to the first slide you opened). Neither of the events are fired. You can continue to click the hyperlinks on each slide and no events will be fire.

     

    If you redo all of the steps above but make a PowerPoint 2007 VSTO AddIn and run it with Office 2007 Installed, you will have events fire every time even on step 6. 

     

    I tried adding all available events to see if any of them are hit on step 6 with Office 2010, but none of them fired.
    Wednesday, June 29, 2011 6:08 PM
  • Hi Urmda,

     

    I’ve tried to reproduce your issue, but the SlideShowNextSlide event will fire when the next slide is shown. I try to switch the hyperlinks to traveling between the *.ppsx files. And the SlideShowNextSlide never missed to fine when I jump to another slide.

     

    I’m wondering whether this issue is regard the environment that you have. I would recommend you try it on other machine to see whether your description will be occurred.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, July 1, 2011 3:14 AM
  • Tom,

    I built a VM using VMWare with the following installed:

    • Windows 7 right out of the box(no updates)
    • Office 2010 Professional Plus Version 14.0.6029.1000 right out of the box(no updates)
    • Installed Office 2010 SP1
    • Visual Studio 2010 Ultimate Version 10.0.3019 Right out of the box(no updates)
    • Installed Visual Studio 2010 SP1

    This is all that was installed on my VM.  No Windows updates were applied or other updates for Office or Visual Studio 2010.

    I created a PowerPoint 2010 VSTO AddIn in VB.  I ran the code with 2 slides with hyperlinks to one another.  When I started slideshow on the first slide, both events fired.  When I clicked the hyperlink on the first slide to go to the second slide, both events fired.  When I clicked the hyperlink on the second slide to link to the first slide, no events are fired.  When I clicked the hyperlink in the first slide that links to the second slide, no events were fired.  And so on... After both slides are opened for the first time, events are no longer fired when you click a hyperlink that is going to either of these two slideshows that are currently open. When I say no events are fired I mean that the message boxes did not pop up when the events are supposed to be hit.

    With PowerPoint 2007, events were fired whether or not the slideshow is running in the background.

    Tuesday, July 5, 2011 2:25 PM