A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Outlook » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I save an HTML email with graphics?



 
 
Thread Tools Display Modes
  #1  
Old November 22nd, 2008, 09:28 PM posted to microsoft.public.outlook.general
IMDWalk
external usenet poster
 
Posts: 2
Default How can I save an HTML email with graphics?

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?

  #2  
Old November 24th, 2008, 09:01 PM posted to microsoft.public.outlook.general
Duncan McC
external usenet poster
 
Posts: 187
Default How can I save an HTML email with graphics?

In article ,
says...
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 AltF11 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

--
Duncan
  #3  
Old November 27th, 2008, 05:30 AM posted to microsoft.public.outlook.general
IMDWalk
external usenet poster
 
Posts: 2
Default How can I save an HTML email with graphics?

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

"Duncan McC" wrote:

In article ,
says...
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 AltF11 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

--
Duncan

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.