I have an Excel macro I use to run weekly reports for 30 or so employees in
my office. The macro saves each employee's report as a separate workbook,
attaches it to an Outlook e-mail, and e-mails it to that employee. I've
been doing this for a while now without any trouble.
After (or before, I don't care) I send each e-mail, I would like to save the
e-mail to a folder on my harddrive as an Outlook file (file type *.msg),
e.g., Sue's Weekly Report.msg. I searched this newsgroup's archive on
Google for code I could use but did not find anything.
So, my question is, can anyone tell me what code to add to my VBA e-mail
procedure to save an Outlook e-mail to my hardrive?
Condor
Bernie Deitrick - 28 Mar 2008 13:51 GMT
Condor,
With the mail item object, just use something like
myItem.SaveAs "C:\Folder\" & strFilename & ".msg"
myItem.Send
Outlook should also save a copy in the sent item folder, if you have that option set.
HTH,
Bernie
MS Excel MVP
>I have an Excel macro I use to run weekly reports for 30 or so employees in my office. The macro
>saves each employee's report as a separate workbook, attaches it to an Outlook e-mail, and e-mails
[quoted text clipped - 8 lines]
>
> Condor
Condor - 29 Mar 2008 05:46 GMT
Thank you. That was very helpful.
Condor
> Condor,
>
[quoted text clipped - 24 lines]
>>
>> Condor