Binding for Office automation

M

Max

I am using late binding to automate my code to Microsoft Outlook and I'm getting an error in my code:

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top