Click here to Skip to main content
15,891,629 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, I am doing an application in which I launch Office App like Word, PowerPoint etc
So, I did for the Word App but now I am doing for the Powerpoint App but I don't know how to put an event on the exit of an instance of Powerpoint and also create an instance of Powerpoint.
Here is what I did for the Word App:

using wd = Microsoft.Office.Interop.Word;

    wd.Application wdApp = new wd.Application();
    wdApp.Visible = true;

    ((wd.ApplicationEvents4_Event)wdApp).Quit += () => { MessageBox.Show("Exited!"); };


What I have tried:

I did for the Word App but not for the Powerpoint App how could I do it ?
Posted
Updated 22-Sep-16 3:27am
Comments
Michael_Davies 22-Sep-16 6:59am    
Have you tried changing

using wd = Microsoft.Office.Interop.Word;

To

using wd = Microsoft.Office.Interop.Powerpoint
TatsuSheva 22-Sep-16 7:51am    
Yes, but my problem here is for the exit event...

1 solution

A list of avaliable event for MS PowerPoint application is here: Application Events (Microsoft.Office.Interop.PowerPoint)[^]

As per description of events, you may use: EApplication_Event.PresentationClose Event (Microsoft.Office.Interop.PowerPoint)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900