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
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Michel,
You can try to handle the OnItemAdd event of the Sent Items folder.
|
|
Michel Brazeau
Posts: 17
Joined: 2006-08-31
|
|