M
Max
I am using late binding to automate my code to Microsoft Outlook and I'm getting an error in my code:
At this point e_InspectorNewEvent_Late is null. Can someone tell me why the last line of code does not return an EventInfo?
Code:
Type objClassType = Type.GetTypeFromProgID("Outlook.Application");
objApp_Late = Activator.CreateInstance(objClassType);
objInspectors_Late = objApp_Late.GetType().InvokeMember("Inspectors", BindingFlags.InvokeMethod, null, objApp_Late, null);
e_InspectorNewEvent_Late = objInspectors_Late.GetType().GetEvent("NewInspector");
At this point e_InspectorNewEvent_Late is null. Can someone tell me why the last line of code does not return an EventInfo?