Image attachments problem

  • Thread starter Thread starter auto
  • Start date Start date
A

auto

I am trying to set up outlook 2002 (XP). When we receive a
message from someone with image attachments (jpg, gif) we
are unable to view them in the message. How do I make it
so we are able to view image the images in the actual
message. I have tried everything, well almost everything.

Can someone help?

Thanks
Auto
 
auto said:
I am trying to set up outlook 2002 (XP). When we receive a
message from someone with image attachments (jpg, gif) we
are unable to view them in the message. How do I make it
so we are able to view image the images in the actual
message. I have tried everything, well almost everything.

Three times for the same question?
--
Brian Tillman
Smiths Aerospace
3290 Patterson Ave. SE, MS 1B3
Grand Rapids, MI 49512-1991
Brian.Tillman is the name, smiths-aerospace.com is the domain.

I don't speak for Smiths, and Smiths doesn't speak for me.
 
Hi

I am using Outlook 2003 and find that this ability is not available for the
choosing (like you can choose to see inline HTML linked images). It is only
available with Outlook Express. Much like the Newsreader feature.

Is anyone aware of third party software which will allow people the *choice*
to view images inline with Outlook? Or something? Anything?

I appreciate that Outlook was designed for text based business purposes
only - but there are some businesses which deal with images. (It's a shame
that everyone else will have to look for alternatives to Outlook Express in
future). For my purposes it just becomes an expensive (and not to be
upgraded!) calendar program otherwise.

thanks

Tab.
 
Hi

Why on Earth don´t you use the exellent help texts to display the HTML
version?

perian
 
Thanks Perian

I understand how to turn off and on the ability to automatically see images
linked or embedded in HTML email. That is not the issue.

I am looking for a way to view genuine image *attachments* to your regular
standard plain text emails. I want to be able to see these attachments
inline in the reader.

Tab



Message Format
Description

HTML
Hypertext Markup Language format enables you to create highly formatted
messages with embedded pictures and hyperlinks. HTML format is Outlook's
default format.

Rich Text
Rich text format (RTF) is currently readable only by Outlook and Eudora
mail clients. RTF enables you to send highly formatted messages, but only to
recipients within your Exchange organization or those using Eudora.

Plain Text
Plain text messages are readable by all clients. Text cannot be
formatted and pictures cannot be embedded. However, all mail clients can
understand plain text.
 
Yay! A smart cookie placed a macro in:
microsoft.public.outlook,microsoft.public.outlook.program_addins

If anyone is interested - the post is titled:
Outlook macro - displays picture attachments inline (updated)

I have cut and paste P_Lee's much appreciated message and macro below the
line.
______________________________________________

This version should fix the problem with not deleting all the files that
were
copied & the problem with sometimes not displaying all the images.

This macro allows you to select one or multiple emails & display all the
picture
attachments together in a broweser window.

- Put a shortcut to the macro on your toolbar for easy access.
- It's safe, because it won't run any executables or other attachments.
- You can select multiple emails & display all the attachments at once.
- It copies the files to 'c:\attachments_outlook' (creates the directory if
necessary - you can modify the path if you wish).
- It then deletes the specific files that were copied (no others).

(Note that the first line is a public declaration & MUST be placed up at the
top
before any other macros.)



Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub view_attachments()
On Error Resume Next

Dim oOL As Outlook.Application
Dim oSelection As Outlook.Selection

Set oOL = New Outlook.Application
Set oSelection = oOL.ActiveExplorer.Selection
Set fs = CreateObject("Scripting.FileSystemObject")

vPath = "c:\Attachments_Outlook\"
If Not fs.FolderExists(vPath) Then fs.CreateFolder vPath

vHTMLBody = "<HTML><title>View Email Attachments</title>"

For Each obj In oSelection
vSubject = "<FONT face=Arial size=3>Attachments from: <b>" _
& obj.Subject & "</b><br>"
vHTMLBody = vHTMLBody & vSubject
For Each Attachment In obj.Attachments
Attachment.SaveAsFile (vPath & Attachment.FileName)
vHTMLBody = vHTMLBody & Attachment.FileName & "</Font><br>" & _
"<IMG alt="""" hspace=0 src=""" & vPath & Attachment.FileName
& _
""" align=baseline border=0><br><br><br>"
Next
Next
vHTMLBody = vHTMLBody & "</html>"

Set ie = CreateObject("internetexplorer.application")
With ie
.toolbar = 0
.menubar = 0
.statusbar = 0
.Left = 100
.Top = 100
.Height = 480
.Width = 640
.navigate "about:blank"
.document.Open
.document.Write vHTMLBody
.document.Close
.Visible = True
End With

Do Until ie.readyState = 4: Sleep 10: Loop
Set ie = Nothing

For Each obj In oSelection
For Each Attachment In obj.Attachments
fs.DeleteFile (vPath & Attachment.FileName)
Next
Next

Set fs = Nothing
Set objMsg = Nothing
Set oSelection = Nothing
Set oOL = Nothing
End Sub

_______________________________________________
 
Try this macro I put together. It's even better than the preview pane because you can
select multiple emails & view all the pictures at once.

It pops up a browser window to display the images & will not run executables or other
types of attachments.

It initially scales large images to the width of the browser popup, but you can click on
the image to toggle between full size & browser width. Hover over the image to see the
original size/scaled size. Resize the browser window, right-click on the background, &
choose 'Refresh' to resize all the images at once.

Click on the subject to bring up the original email.

See comments in the macro for more details.

Note that the 'Public Declare Sub Sleep...' statement need to go up at the very top before
any other macros.

**Put a shortcut on your toolbar for easy access.**



Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Sub view_attachments()
'***************************************************************
' ver. 1/30/04
' - Select one or multiple emails.
' - Copies files to 'Temporary Internet Files\view_attachments'
' (previously copied files are deleted each time it's run).
' - Only image files are displayed (no others are executed).
' - Right-click images to 'Save As', 'Email', 'Print', etc.
' - Hover over image to see original size & scaled size.
' - Clicking each image will toggle between original size
' & browser width (unless original size is smaller).
' - To scale all images to browser width, resize the browser,
' right-click on background & choose 'Refresh'.
'***************************************************************
On Error Resume Next

Dim oOL As Outlook.Application
Dim oSelection As Outlook.Selection

Set oOL = New Outlook.Application
Set oSelection = oOL.ActiveExplorer.Selection
Set objShell = CreateObject("WScript.Shell")
Set fs = CreateObject("Scripting.FileSystemObject")

vTempInt = objShell.RegRead("HKCU\software\microsoft\" _
& "Windows\CurrentVersion\Explorer\Shell Folders\Cache")
vPath = vTempInt & "\view_attachments\"

If fs.FolderExists(vPath) Then
fs.DeleteFile (vPath & "*.*")
Else
fs.CreateFolder vPath
End If

vBkgrColor = "000000"
vFontColor = "FFFFFF"
vHTMLBody = "<HTML><title>View Email Attachments</title>" _
& "<body bgcolor=#" & vBkgrColor & " link=#" & vFontColor _
& " alink=#" & vFontColor & " vlink=#" & vFontColor _
& "><font face=Arial size=3 color=#" & vFontColor & ">"

vEmailNum = 0
For Each obj In oSelection
vEmailNum = vEmailNum + 10
vSubject = "Attachments from: <a href=""Outlook:" _
& obj.EntryID & """><b>" & obj.Subject & "</b></a><br>"
vHTMLBody = vHTMLBody & vSubject
vAttachNum = vEmailNum
For Each Attachment In obj.Attachments
vAttachNum = vAttachNum + 1
vImg = "document.img" & vAttachNum
vWidth = "document.body.clientWidth - 20"
Attachment.SaveAsFile (vPath & Attachment.FileName)
vHTMLBody = vHTMLBody _
& "<b>" & Attachment.FileName & "</b><br>" _
& "<a href=""javascript:fWidth(" & vImg & ");"">" _
& "<center><IMG name=""img" & vAttachNum & """ alt="""" hspace=0 " _
& "src=""" & vPath & Attachment.FileName & """ align=baseline " _
& "border=0 " & "onload=""vOrig=String(" & vImg & ".width)" _
& "+ ' x ' + String(" & vImg & ".height);vRatio=(" & vWidth _
& ")/" & vImg & ".width;" & vImg & ".alt='Original Size: ' + " _
& "vOrig + '\n Scaled Size: ';if(" & vImg & ".width <=" _
& vWidth & "){" & vImg & ".alt=" & vImg & ".alt + vOrig;}" _
& "else{" & vImg & ".alt=" & vImg & ".alt + String(" & vWidth _
& ")+ ' x ' + String(Math.round(vRatio *" & vImg & ".height));}" _
& "if (" & vImg & ".width >" & vWidth & "){" & vImg & ".width = " _
& vWidth & ";}""></center></a><br><br><br>"
Next
vHTMLBody = vHTMLBody & "</a><br><br>"
Next

If Not vImg = "" Then
vHTMLBody = vHTMLBody & "<script>function fWidth (vImg){" _
& "vCRLF=vImg.alt.indexOf('\n');vOrgWidth=vImg.alt.substring" _
& "(vImg.alt.indexOf(':')+2, vImg.alt.indexOf('x')-1);" _
& "if(vImg.width == " & vWidth & "|| vOrgWidth <= " & vWidth _
& "){vImg.width=vOrgWidth;vImg.alt=vImg.alt.substring(0,vCRLF)" _
& "+ '\n Scaled Size: '+ vImg.alt.substring(vImg.alt." _
& "indexOf(':')+2,vCRLF);}else{vImg.width=" & vWidth & ";" _
& "vImg.alt=vImg.alt.substring(0,vCRLF) + '\n Scaled Size: '" _
& "+ String(" & vWidth & ")+ ' x ' + String(vImg.height);}}</script>"
End If

vHTMLBody = vHTMLBody & "</font></body></html>"

Set ie = CreateObject("internetexplorer.application")
With ie
.toolbar = 0
.menubar = 0
.statusbar = 0
.Left = 100
.Top = 50
.Height = 600
.Width = 800
.navigate "about:blank"
.document.Open
.document.Write vHTMLBody
.document.Close
.Visible = True
End With

vTimer = 0
Do Until ie.readyState = 4 Or vTimer = 10000
Sleep 10
vTimer = vTimer + 10
Loop

Set ie = Nothing
Set fs = Nothing
Set objShell = Nothing
Set oSelection = Nothing
Set oOL = Nothing
End Sub
 
Be sure to get the latest version (ver. 1/30/04 in the macro comments). It has many
improvements over the older one listed below:

'***************************************************************
' ver. 1/30/04
' - Select one or multiple emails.
' - Copies files to 'Temporary Internet Files\view_attachments'
' (previously copied files are deleted each time it's run).
' - Only image files are displayed (no others are executed).
' - Right-click images to 'Save As', 'Email', 'Print', etc.
' - Hover over image to see original size & scaled size.
' - Clicking each image will toggle between original size
' & browser width (unless original size is smaller).
' - To scale all images to browser width, resize the browser,
' right-click on background & choose 'Refresh'.
' - Click subject hyperlink to bring up original email.
'***************************************************************

It's in an earlier posting from today titled 'Re: inline images - was Re: Image
attachments problem'.
 
Thanks. You're wonderful.

Tab



P_Lee said:
Try this macro I put together. It's even better than the preview pane because you can
select multiple emails & view all the pictures at once.

It pops up a browser window to display the images & will not run executables or other
types of attachments.

It initially scales large images to the width of the browser popup, but you can click on
the image to toggle between full size & browser width. Hover over the image to see the
original size/scaled size. Resize the browser window, right-click on the background, &
choose 'Refresh' to resize all the images at once.

Click on the subject to bring up the original email.

See comments in the macro for more details.

Note that the 'Public Declare Sub Sleep...' statement need to go up at the very top before
any other macros.

**Put a shortcut on your toolbar for easy access.**



Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Sub view_attachments()
'***************************************************************
' ver. 1/30/04
' - Select one or multiple emails.
' - Copies files to 'Temporary Internet Files\view_attachments'
' (previously copied files are deleted each time it's run).
' - Only image files are displayed (no others are executed).
' - Right-click images to 'Save As', 'Email', 'Print', etc.
' - Hover over image to see original size & scaled size.
' - Clicking each image will toggle between original size
' & browser width (unless original size is smaller).
' - To scale all images to browser width, resize the browser,
' right-click on background & choose 'Refresh'.
'***************************************************************
On Error Resume Next

Dim oOL As Outlook.Application
Dim oSelection As Outlook.Selection

Set oOL = New Outlook.Application
Set oSelection = oOL.ActiveExplorer.Selection
Set objShell = CreateObject("WScript.Shell")
Set fs = CreateObject("Scripting.FileSystemObject")

vTempInt = objShell.RegRead("HKCU\software\microsoft\" _
& "Windows\CurrentVersion\Explorer\Shell Folders\Cache")
vPath = vTempInt & "\view_attachments\"

If fs.FolderExists(vPath) Then
fs.DeleteFile (vPath & "*.*")
Else
fs.CreateFolder vPath
End If

vBkgrColor = "000000"
vFontColor = "FFFFFF"
vHTMLBody = "<HTML><title>View Email Attachments</title>" _
& "<body bgcolor=#" & vBkgrColor & " link=#" & vFontColor _
& " alink=#" & vFontColor & " vlink=#" & vFontColor _
& "><font face=Arial size=3 color=#" & vFontColor & ">"

vEmailNum = 0
For Each obj In oSelection
vEmailNum = vEmailNum + 10
vSubject = "Attachments from: <a href=""Outlook:" _
& obj.EntryID & """><b>" & obj.Subject & "</b></a><br>"
vHTMLBody = vHTMLBody & vSubject
vAttachNum = vEmailNum
For Each Attachment In obj.Attachments
vAttachNum = vAttachNum + 1
vImg = "document.img" & vAttachNum
vWidth = "document.body.clientWidth - 20"
Attachment.SaveAsFile (vPath & Attachment.FileName)
vHTMLBody = vHTMLBody _
& "<b>" & Attachment.FileName & "</b><br>" _
& "<a href=""javascript:fWidth(" & vImg & ");"">" _
& "<center><IMG name=""img" & vAttachNum & """ alt="""" hspace=0 " _
& "src=""" & vPath & Attachment.FileName & """ align=baseline " _
& "border=0 " & "onload=""vOrig=String(" & vImg & ".width)" _
& "+ ' x ' + String(" & vImg & ".height);vRatio=(" & vWidth _
& ")/" & vImg & ".width;" & vImg & ".alt='Original Size: ' + " _
& "vOrig + '\n Scaled Size: ';if(" & vImg & ".width <=" _
& vWidth & "){" & vImg & ".alt=" & vImg & ".alt + vOrig;}" _
& "else{" & vImg & ".alt=" & vImg & ".alt + String(" & vWidth _
& ")+ ' x ' + String(Math.round(vRatio *" & vImg & ".height));}" _
& "if (" & vImg & ".width >" & vWidth & "){" & vImg & ".width = " _
& vWidth & ";}""></center></a><br><br><br>"
Next
vHTMLBody = vHTMLBody & "</a><br><br>"
Next

If Not vImg = "" Then
vHTMLBody = vHTMLBody & "<script>function fWidth (vImg){" _
& "vCRLF=vImg.alt.indexOf('\n');vOrgWidth=vImg.alt.substring" _
& "(vImg.alt.indexOf(':')+2, vImg.alt.indexOf('x')-1);" _
& "if(vImg.width == " & vWidth & "|| vOrgWidth <= " & vWidth _
& "){vImg.width=vOrgWidth;vImg.alt=vImg.alt.substring(0,vCRLF)" _
& "+ '\n Scaled Size: '+ vImg.alt.substring(vImg.alt." _
& "indexOf(':')+2,vCRLF);}else{vImg.width=" & vWidth & ";" _
& "vImg.alt=vImg.alt.substring(0,vCRLF) + '\n Scaled Size: '" _
& "+ String(" & vWidth & ")+ ' x ' +
 
Back
Top