Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Outlook messages generated from Excel macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Condor - 28 Mar 2008 04:54 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.