none
How do i get to know that next slide will be black screen end of slide. as I am not getting any event from last slide to black screen, RRS feed

  • Question

  • For ex. i have 3 slides in my powerpoint. i opened powerpoint in C# application. when user clicks on the next button or press right arrow to move on next slide, i get the event "SlideShowNextSlide". for ex, from first slide to second slide, then second slide to third slide, but i m not getting any event when user jump to next slide from third slide as it is black screen ("end of slideshow. click here to exit). so how do i get to know that next slide is black screen ,
    Wednesday, September 17, 2014 3:55 PM

Answers

  • Hi,

    >>how do i get to know that next slide is black screen<<

    In fact, the black screen("end of slideshow. click here to exit") is not a slide, it displays as a buffer role in PowerPoint slide show mode. In addition, Application.SlideShowNextSlide Event occurs immediately before the transition to the next slide. So the event won't be triggered when jumping to the black screen.

    After researching and testing, I fail to find an object or property about the black screen. Though there is PpSlideShowState Enumeration which constants that specify the state of the slide show, it cannot be used because jumping to black screen won't trigger the SlideShowNextSlide Event. There is no other event which can capture the transition to the blank screen.

    So I think it's hard to know next slide is blank screen. For a workaround, we can know the last slide in slideshow mode by Presentation.SlideShowWindow.View.Slide.SlideIndex. Here is a sample for your reference. In this sample, you will see, when jumping to the blank screen, the SlideIndex is equal to the last index of slide. 

    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        PowerPoint.Application app=Globals.ThisAddIn.Application ;
        app.SlideShowNextSlide += app_SlideShowNextSlide;            
    }
    
    void app_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
    {
        PowerPoint.Application app=Globals.ThisAddIn.Application;
        PowerPoint.Presentation presentation = app.ActivePresentation;
        if (presentation.Slides.Count == presentation.SlideShowWindow.View.Slide.SlideIndex)
            MessageBox.Show("This is the last slide!");
    }

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 19, 2014 4:20 AM
    Moderator

All replies

  • Hi,

    I'm afraid that it is not the correct forum about this issue, since this forum is to discuss WPF.

    So I have moved this thread to Office Development forum for better response.

    Thanks for your understanding.

    Best regards,
    Franklin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 18, 2014 6:14 AM
  • Hi,

    >>how do i get to know that next slide is black screen<<

    In fact, the black screen("end of slideshow. click here to exit") is not a slide, it displays as a buffer role in PowerPoint slide show mode. In addition, Application.SlideShowNextSlide Event occurs immediately before the transition to the next slide. So the event won't be triggered when jumping to the black screen.

    After researching and testing, I fail to find an object or property about the black screen. Though there is PpSlideShowState Enumeration which constants that specify the state of the slide show, it cannot be used because jumping to black screen won't trigger the SlideShowNextSlide Event. There is no other event which can capture the transition to the blank screen.

    So I think it's hard to know next slide is blank screen. For a workaround, we can know the last slide in slideshow mode by Presentation.SlideShowWindow.View.Slide.SlideIndex. Here is a sample for your reference. In this sample, you will see, when jumping to the blank screen, the SlideIndex is equal to the last index of slide. 

    private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        PowerPoint.Application app=Globals.ThisAddIn.Application ;
        app.SlideShowNextSlide += app_SlideShowNextSlide;            
    }
    
    void app_SlideShowNextSlide(PowerPoint.SlideShowWindow Wn)
    {
        PowerPoint.Application app=Globals.ThisAddIn.Application;
        PowerPoint.Presentation presentation = app.ActivePresentation;
        if (presentation.Slides.Count == presentation.SlideShowWindow.View.Slide.SlideIndex)
            MessageBox.Show("This is the last slide!");
    }

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, September 19, 2014 4:20 AM
    Moderator