none
How do i can disable powerpoint slide show click event in C#? RRS feed

  • Question

  • I am playing powerpoint slide show in grid. when user clicks on the slideshow slide jump to the next slide, I have button in my app for next and previous slide. i dont want that when user clicks on the next slide than it will jump to next slide. how do i can disable this click event..

    I got from internet that open slide show in kiosk mode but its not working. after opening kiosk mode user still can jump to the next slide by clicking on slide. how do i can stop this event ??

    Thursday, May 15, 2014 11:30 AM

Answers

  • Hi,

    Based on the description, you don’t want to jump to next slide after the user click on the slide.

    You can stop the default behavior like figure below:

    Also you can achieve this using code. Here is a sample for your reference:

    using System;
    
    using System.Collections.Generic;
    
    using System.Linq;
    
    using System.Text;
    
    using PPT = Microsoft.Office.Interop.PowerPoint;
    
    
    namespace ConsoleApplication8
    
    {
    
        public class StopClickEvent
    
        {
    
            public void Main() 
    
            {
    
                PPT.Application pptApp = new PPT.Application();
    
                PPT.Presentation ppt=pptApp.Presentations.Open(@"C:\Users\UserName\Documents\Slide1.pptx");
    
                foreach (PPT.Slide slide in ppt.Slides)
    
                {
    
                    slide.SlideShowTransition.AdvanceOnClick = Microsoft.Office.Core.MsoTriState.msoFalse;
    
                }
    
                pptApp.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
    
                ppt.SlideShowSettings.Run();
    
            }
    
        }
    
    }
    

    Best regards

    Fei


    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, May 16, 2014 7:12 AM
    Moderator

All replies

  • Hi Sumit,

    I think this thread is specific to Office Dev forum. So I am helping you to move this thread directly into that forum. Thank you for your understanding.

    Regards,


    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, May 16, 2014 1:32 AM
  • Hi,

    Based on the description, you don’t want to jump to next slide after the user click on the slide.

    You can stop the default behavior like figure below:

    Also you can achieve this using code. Here is a sample for your reference:

    using System;
    
    using System.Collections.Generic;
    
    using System.Linq;
    
    using System.Text;
    
    using PPT = Microsoft.Office.Interop.PowerPoint;
    
    
    namespace ConsoleApplication8
    
    {
    
        public class StopClickEvent
    
        {
    
            public void Main() 
    
            {
    
                PPT.Application pptApp = new PPT.Application();
    
                PPT.Presentation ppt=pptApp.Presentations.Open(@"C:\Users\UserName\Documents\Slide1.pptx");
    
                foreach (PPT.Slide slide in ppt.Slides)
    
                {
    
                    slide.SlideShowTransition.AdvanceOnClick = Microsoft.Office.Core.MsoTriState.msoFalse;
    
                }
    
                pptApp.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
    
                ppt.SlideShowSettings.Run();
    
            }
    
        }
    
    }
    

    Best regards

    Fei


    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, May 16, 2014 7:12 AM
    Moderator
  • Thanks, Its working fine.
    Thursday, May 29, 2014 11:22 AM