View Single Post
  #2  
Old June 8th 07, 01:31 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default C# and New Inspector event

Your object must suppport the IDispatch and IInspectorEvents interfaces .

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"bstrum" wrote in message
...
Does anyone have code to capture the new inspector event from c# using
late
binding? I need to be able to capture this event in an Office version
neutral way.

I put some code together but it fails on the advise method with an invalid
cast exception.

Guid guid = new Guid("{000????-0000-0000-C000-000000000046}");
UCOMIConnectionPointContainer oCPP = (UCOMIConnectionPointContainer)app;
oCPP.FindConnectionPoint(ref guid, out m_oConnectionPoint);
m_oConnectionPoint.Advise(this, out m_Cookie);

Thanks,

Benjamin Strum
ThinkTron Corp.



Ads