I use the Reflection to subscribe the events from PowerPoint as below:
EventInfo eInfo = m_powerPoint.GetEvent(_eventName);
if (eInfo != null)
Type handlerType = eInfo.EventHandlerType;
MethodInfo method = this.GetType().GetMethod(_funcName, BindingFlags.NonPublic | BindingFlags.Instance);
Delegate handler = Delegate.CreateDelegate(eInfo.EventHandlerType, this, method);
It is working fine, however, I am facing the problem that I can not catch the Close event from PowerPoint, then I do not release by calling eInfo.RemoveEventHandler(m_PowerPointObject, _handler);.
That's why the PowerPoint could not be shutdown.
Does anyone know how we can trap the close event?
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?