How can I save an HTML email with graphics?

  • Thread starter Thread starter IMDWalk
  • Start date Start date
I

IMDWalk

In Internet Explorer, when I save a web page as a file, I am given the
options to save it as:
- Web Page, complete (*.htm, *.html)
- Web Archive, single file (*.mht)
These options save the emails as HTML files with all embedded graphics. The
graphics are stored in a separate folder in the same directory as the HTML
file; the folder is given the same name as the file, with an "_files"
appended on the end.

However, in Outlook (2003), my only option is to save as HTML with no
graphics. This forces me to save the file in Outlook, then open a browser,
open the file in the browser, and resave it. This is highly inefficient.

Does anyone know if there is a way to include these other save options in
Outlook? Is there a plugin, or a config change, or some other option?
 
In Internet Explorer, when I save a web page as a file, I am given the
options to save it as:
- Web Page, complete (*.htm, *.html)
- Web Archive, single file (*.mht)
These options save the emails as HTML files with all embedded graphics. The
graphics are stored in a separate folder in the same directory as the HTML
file; the folder is given the same name as the file, with an "_files"
appended on the end.

However, in Outlook (2003), my only option is to save as HTML with no
graphics. This forces me to save the file in Outlook, then open a browser,
open the file in the browser, and resave it. This is highly inefficient.

Does anyone know if there is a way to include these other save options in
Outlook? Is there a plugin, or a config change, or some other option?

I use some VBA that I found (slipstick website?) sometime ago. Works
great for me, it saves out the pics from any (open) email. I modified
it a bit, but the old code is there, commented out. I also made some
changes to delete pics from emails (that I find handy for html emails
with embedded graphics).

You'll need to change the macro security level to let the code run
(change it so that it prompts you to run it).

Enter the VBA by pressing <Alt><F11> to open the code window - and watch
the word-wrap that has undoubtably happenned in my paste below...

' Save all Attachments in an (open) email=3F
Sub SaveAttachments()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment

Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")

For Each objAttachment In colAttachments
' objAttachment.SaveAsFile (strFolderpath.SpecialFolders("Desktop") &
"\" & objAttachment.FileName)
' MsgBox (strFolderpath.SpecialFolders("MyDocuments") & "\email
attachments\" & objAttachment.FileName)
objAttachment.SaveAsFile (strFolderpath.SpecialFolders
("MyDocuments") & "\email attachments\" & objAttachment.FileName)
Next

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub
' Delete all Attachments in an (open) email=3F
Sub DeleteAttachments()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment

Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
' Set strFolderpath = CreateObject("WScript.Shell")

While colAttachments.Count > 0
colAttachments.Remove 1
Wend

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Save
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub
 
Great...thanks, Duncan! I'll give it a try.

Duncan McC said:
I use some VBA that I found (slipstick website?) sometime ago. Works
great for me, it saves out the pics from any (open) email. I modified
it a bit, but the old code is there, commented out. I also made some
changes to delete pics from emails (that I find handy for html emails
with embedded graphics).

You'll need to change the macro security level to let the code run
(change it so that it prompts you to run it).

Enter the VBA by pressing <Alt><F11> to open the code window - and watch
the word-wrap that has undoubtably happenned in my paste below...

' Save all Attachments in an (open) email=3F
Sub SaveAttachments()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment

Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
Set strFolderpath = CreateObject("WScript.Shell")

For Each objAttachment In colAttachments
' objAttachment.SaveAsFile (strFolderpath.SpecialFolders("Desktop") &
"\" & objAttachment.FileName)
' MsgBox (strFolderpath.SpecialFolders("MyDocuments") & "\email
attachments\" & objAttachment.FileName)
objAttachment.SaveAsFile (strFolderpath.SpecialFolders
("MyDocuments") & "\email attachments\" & objAttachment.FileName)
Next

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub
' Delete all Attachments in an (open) email=3F
Sub DeleteAttachments()
Dim objCurrentItem As Outlook.MailItem
Dim colAttachments As Outlook.Attachments
Dim objAttachment As Outlook.Attachment

Set objCurrentItem = Application.ActiveInspector.CurrentItem
Set colAttachments = objCurrentItem.Attachments
' Set strFolderpath = CreateObject("WScript.Shell")

While colAttachments.Count > 0
colAttachments.Remove 1
Wend

Set objAttachment = Nothing
Set colAttachments = Nothing
objCurrentItem.Save
objCurrentItem.Close (olDiscard)
Set objCurrentItem = Nothing

End Sub
 
Back
Top