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.
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!"); };
And here is what I did for the Powerpoint App:
using wd = Microsoft.Office.Interop.PowerPoint; wd.Application wdApp = new wd.Application(); wdApp.Visible = true; ((wd.ApplicationEvents4_Event)wdApp).Quit += () => { MessageBox.Show("Exited!"); };
But the error I got is that it doesn't recognize this: "ApplicationEvents4_Event"...
Thank you.