Hooking up the ItemSend Event...

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
 
D

Dmitry Streblechenko

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
-
 

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