Log in

View Full Version : Copy Body of Email and save to file



tomcoleman
01-11-2008, 12:38 AM
Hi there

I receive an email everyday that is in HTML format.

Is there a script/marco that can run to say when email is received from bla@bla.com to copy or save the email as HTML and place to a drive on the network and overwrite the exsisting file?

This would be VERY userful to me !!!

Cheers all

:friends:

TonyJollans
01-14-2008, 01:35 PM
I am no expert in Outlook but I think the only way to save it is with VBA. If you want VBA to run when the e-mail arrives you need to drive it from a rule.

First create a macro, something like this:


Sub MyMacro(MI As MailItem)
MI.SaveAs "Drive\And\Path\To\File.htm", olHTML
End Sub


Then create a new rule - this is 2007 it may be slightly different in earlier versions:

Tools > Rules and Alerts...
Click on New Rule
Under Start from a Blank Rule, click Check messages when they arrive
Click Next
Select whatever it is in the list that will identify the e-mail
Then click on the link in the bottom panel to provide the specific detail
Click Next
Check Run a Script
Click on "a script" in the bottom panel
Choose your macro from the list
Click OK
Click Next
Choose exceptions if you want
Click Next
Give it a proper name
Click Finish
Click OK

BUT Please test because my Outlook skills are limited.