Hi -
I am developing an application that needs to automate Microsoft Outlook and
I need to capture the ItemSend event. The PC I'm developing with has Outlook
2003 on; the problem I have is I need to make the code work with Outlook XP
(i.e. 2002)!
The code to add the event is currently:
oOutlook.ItemSend += new Outlook.ApplicationEvents_11_ItemSendEventHandler
(oOutlook_ItemSend);
This works fine for Outlook 2003, but causes an 80040200 exception when used
with a computer running Outlook XP!
Changing the above to:
oOutlook.ItemSend += new Outlook.ApplicationEvents_10_ItemSendEventHandler
(oOutlook_ItemSend);
Causes a compilation error (cannot convert to
ApplicationEvents_11_ItemSendEventHandler).
I've also tried:
oOutlook.ItemSend += new Outlook.ApplicationEvents_ItemSendEventHandler
(oOutlook_ItemSend);
With essentially the same error as above being generated.
Can anyone shed any light on what I need to do to create an event that will
work with Outlook 2003 and XP?
TIA
- Andy