none
Open Custom SlideShow from C# WPF RRS feed

  • Question

  • Hey Guys,

    I want to open a custom SlideShow before the WebBrowser runs it so i can run my Programm with good Performance.

    I found this link but i dont know how to get my custom path executed by the run method. How can i achieve this?

    i tried something like this

    using PPt = Microsoft.Office.Interop.PowerPoint;
    ...
    private PPt.Presentation oPPPresentation = null;
    ...
    oPPPresentation.SlideShowSettings.SlideShowName = "c\path\example.pptx"; oPPPresentation.SlideShowSettings.Run();

    but it didnt work...



    thanks in advance :)





    Tuesday, May 29, 2018 6:29 AM

All replies

  • Hi,

    This forum discusses and asks questions about WPF development, since your issue is more related office development, which use office interop API, I will move it the thread to office development forum for suitable support.

    Thanks for your understanding

    Best regards,

    Zhanglong


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 29, 2018 9:11 AM
  • Hi,

    What do you mean by "custom slideshow"?

    I suggest you try code below:

                PPt.Application application = new PPt.Application();
                application.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
                application.WindowState = PPt.PpWindowState.ppWindowNormal;
                PPt.Presentation presentation = application.Presentations.Open(@"C:\Users\xx\Desktop\Test.pptx", Microsoft.Office.Core.MsoTriState.msoFalse,
                        Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue);
                application.Activate();
                presentation.SlideShowSettings.Run();
    

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 1, 2018 5:52 AM