Discussion:
Save Sent Items to an external lokation
(too old to reply)
HenrikH
2009-09-14 13:07:21 UTC
Permalink
I'm looking for at VBA code that saves Outlook emails to en external
lokation, ie k:\documents\mails, after the mail is sent.

I have a code that saves the email before it's sent but thats not god
because when opened from the external location the mails seems like it
is'nt sent (bacause it was saved _before_ it was sent). Saving it
after it has been sent will also give me the benefit of being able to
see the time it was sent.

Any ideas?
Bastien Piroue
2009-09-14 15:08:00 UTC
Permalink
Hi Henrik,

hm, I had this problem, too. I did it this way: I send the mail, wait
for a couple of seconds and watch in the sent folder until the message
count has increased of 1. With that email, I do a saveas, and this
works pretty good. I've not a found a link from the composed mail to
the sent mail other than looking into the sent folder. If anybody has
a better solution, please tell!!! :-)

Bastien
Sue Mosher [MVP]
2009-09-14 15:25:12 UTC
Permalink
There's no need to watch the message count. Just use the
MAPIFolder.Items.ItemAdd event.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
Post by Bastien Piroue
Hi Henrik,
hm, I had this problem, too. I did it this way: I send the mail, wait
for a couple of seconds and watch in the sent folder until the message
count has increased of 1. With that email, I do a saveas, and this
works pretty good. I've not a found a link from the composed mail to
the sent mail other than looking into the sent folder. If anybody has
a better solution, please tell!!! :-)
Bastien
HenrikH
2009-09-15 08:42:44 UTC
Permalink
Hi Sue

Sounds right. You would'nt by any chance have a snip of code doing
just that ;-)
Sue Mosher [MVP]
2009-09-15 13:02:20 UTC
Permalink
You can see a basic ItemAdd event handler for the Sent Items folder here:
http://www.outlookcode.com/codedetail.aspx?id=456
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
Post by HenrikH
Hi Sue
Sounds right. You would'nt by any chance have a snip of code doing
just that ;-)
HenrikH
2009-09-18 09:50:09 UTC
Permalink
Thanks Sue it seems to be just what I was looking for.

Loading...