开发者

Change an Outlook Email File to HTML

开发者 https://www.devze.com 2022-12-17 11:42 出处:网络
I was searching for a method to change Outlook Emails to HTML.I found one method that uses VBscript,开发者_开发问答 but it only changes the Outlook File to Text.

I was searching for a method to change Outlook Emails to HTML. I found one method that uses VBscript,开发者_开发问答 but it only changes the Outlook File to Text.

Edit: I'm looking for a way to automatically save hundreds of emails to HTML format.


There are number of ways to go here:

  1. Set up a rule to run a script
  2. Wire up a VBS script to fire when you receive and email
  3. Write and Add-in to do the above.

The advantage of the Add-in is that it can be easily deployed compared to rules and scripts, but it a little more complicated.

Number 1 Is probably the easiest to set up if you have no experience.

  1. Open the Visual Basic Editor (Alt+F11) or off the tools menu > Macro
  2. Click on the ThisOutlookSession node on the left
  3. Copt this code in to the right hand page

    Sub CustomMailMessageRule(Item As Outlook.MailItem) Dim HtmlMessagePath As String

    HtmlMessagePath = "C:\Users\Marcus\AppData\Roaming\KnowledgeMill\html\" + Item.Subject + ".html" Call Item.SaveAs(HtmlMessagePath, OlSaveAsType.olHTML)

    End Sub

4 .Change the paths and may be use the Item.EntryID as the file name as you could get filename problems with subject you may also want to use mhtml so that you get everything in one file.

5.Create a Rule using the rules wizard and get it to fire on new emails and then to run a script. Click on the Blue script links and select the new script.

6.You may have to adjust you macro security to allow the script to run. (N.B restart outlook after you do this)


You can acutally view the email in a browser in outlook 2007. The option is under under 'other actions' in the ribbon.

You can save the email as html too!


You can set up rules to print emails automatically. I would just set up an HTML printer on your computer.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号