PowerPoint.Application not raising events in C#

Posted by AdmSteck on Stack Overflow See other posts from Stack Overflow or by AdmSteck
Published on 2010-03-31T14:58:03Z Indexed on 2010/04/01 19:43 UTC
Read the original article Hit count: 221

Filed under:
|

I have a simple application written in C# and .Net 2.0 that displays several PowerPoint 2003 files in a loop. (It is going to be used for a information board in our cafeteria) The application works fine on my development machine but when I deploy it to another machine the events I have registered for SlideShowNextSlide and PresentationClose are never fired. I have tried registering the events with this method.

private void InitPPT()
    {
        app.SlideShowNextSlide += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowNextSlideEventHandler(app_SlideShowNextSlide);
        app.PresentationClose += new Microsoft.Office.Interop.PowerPoint.EApplication_PresentationCloseEventHandler(app_PresentationClose);
        app.SlideShowEnd += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowEndEventHandler(app_PresentationClose);
    }

And with this method that I found here:

private void InitPPT()
    {
        IConnectionPointContainer oConnPointContainer = (IConnectionPointContainer)app;
        Guid guid = typeof(Microsoft.Office.Interop.PowerPoint.EApplication).GUID;
        oConnPointContainer.FindConnectionPoint(ref guid, out m_oConnectionPoint);
        m_oConnectionPoint.Advise(this, out m_Cookie);            
    }

Do I need to register some dll's on the client machine or am I missing something.

© Stack Overflow or respective owner

Related posts about c#

Related posts about powerpoint