Need help with OutlookApp.OnItemSend

Add-in Express™ Support Service
That's what is more important than anything else

Need help with OutlookApp.OnItemSend
 
Michel Brazeau




Posts: 17
Joined: 2006-08-31

Hi All,

I used the OnItemSent event in OutlookApp like the example,

http://www.add-in-express.com/files/adxht-002-d5-7.zip

and that works fine.

Inside the event, I save the email to a temporary MSG file,

MI.SaveAs( TempFileName, olMsg);

and then I send the MSG file to an external system.

When the MSG file is then viewed in outlook, it displays a message,

"This message has not been sent"

which is correct because the email has not been sent. But the email will be sent later.

I am not sure what approach to take. I would like to archive the MSG file as if it has been sent.

I tried MI.Send inside the OnItemSend handler but that raises an access violation.

The Sent propery is readonly so I cannot change that before saving the MSG file.

Any other ideas on how I can "intercept" an outgoing email when the user presses the Send button (because I need to confirm with the user if this particular email is the be archived), and have the MSG file appear as "Sent".

Thanks for any help,

Best regards,

Michel





Posted 19 Oct, 2006 11:46:47 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Michel,

You can try to handle the OnItemAdd event of the Sent Items folder.

Posted 20 Oct, 2006 07:58:01 Top
Michel Brazeau




Posts: 17
Joined: 2006-08-31

This is what I am working on now.

Found example in,

http://www.add-in-express.com/forum/read.php?FID=1&TID=411&MID=2087&phrase_id=289080#message2087


Thanks,

Michel
Posted 20 Oct, 2006 09:03:57 Top