Hooking up the ItemSend Event...

  • Thread starter Thread starter Marketware
  • Start date Start date
M

Marketware

I create an Application object to Outlook with this code:

public Outlook.Application outlookApp = null;

Outlook.ApplicationClass _app = new Outlook.ApplicationClass();
outlookApp = (Outlook.Application)_app;

Then I try to hookup the ItemSend event as follows:

outlookApp.ItemSend +=
new
Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler(OnSend);

I get the following error:

Cannot implicitly convert type
'Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler'
to 'Outlook.ApplicationEvents_ItemSendEventHandler'

Can anyone tell me what I am doing wrong? Thanks!!

bob
 
So have you tried to replace the line

outlookApp.ItemSend += new
Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler(OnSend);

with

outlookApp.ItemSend += new
Microsoft.Office.Interop.Outlook.ApplicationEvents_ItemSendEventHandler(OnSend);


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