Showing attached pictures

K

Kevin

I'm using MS Outlook 2003, and all pictures come in as
attachments. I would like to view the pictures in the body
of the email. Help!
 
J

Jocelyn Fiorello [MVP - Outlook]

Outlook can only display images "inline" if the sender used HTML or Rich
Text format for the message and embedded the image into the body. If the
image was sent as an attachment, you will always receive it as an
attachment.

--
Jocelyn Fiorello
MVP - Outlook

*** Messages sent to my e-mail address will NOT be answered -- please
reply only to the newsgroup to preserve the message thread. ***


In
 
E

Emil G

I used the macro that you developed in outlook and really like it but there is one question I have

My Cousin sent me a picture from her digital camera without making it small it is like 2000x1500 pixels. So when I view the pic with your macro I can’t see it all without scrolling. Also for some reason it doesn’t give the option in the lower right hand side of fitting the pic to the window. Do you know of a way to make it so I can

Thanks

Emil
 
K

Kristina

Hi Patrick,

Just wanted to give you feedback on this macro and thank you. I didn't even know what a "macro" did when I read your posts today, but I did my homework and was able to get it up and running in Outlook and it is WONDERDFUL! I even made a toolbar button for it, like you suggested. My photo editor program took FOREVER to load up the pics when I opened them, and it was driving me CRAZY. You saved my sanity! Thanks so much!

Kristina

----- P_Lee wrote: -----

Updated version of the view attachments macro.

- Saves files in temporary internet folders instead of creating directory.
Files are automatically deleted from temporary folders when Outlook is closed.
- Allows right-click of image to 'Save As', 'Email', 'Print' etc. (previous
version deleted files, so this functionality did not work).
- Fixed auto resizing of images to browser width (previous version sometimes
didn't resize extremely large images the first time). If you want to resize
manually just resize the browser window, right-click, & choose 'Refresh' to
scale the images to the new browser width.

Please try it out & give me some feedback....



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

Sub view_attachments()
'********************************************************************
' ver. 1/21/04 - Copies files to Temporary Internet folders.
' This enables right-click access to 'Save As', 'Email', etc.
' Files are automatically deleted when Outlook is closed.
'********************************************************************
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")

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

vHTMLBody = "<HTML><title>View Email Attachments</title>"
vEmailNum = 0
For Each obj In oSelection
vEmailNum = vEmailNum + 10
vSubject = "<FONT face=Arial size=3>Attachments from: <b>" _
& obj.Subject & "</b><br>"
vHTMLBody = vHTMLBody & vSubject
vAttachNum = vEmailNum
For Each Attachment In obj.Attachments
vAttachNum = vAttachNum + 1
vImg = "document.img" & vAttachNum
Attachment.SaveAsFile (vPath & Attachment.FileName)
vHTMLBody = vHTMLBody & Attachment.FileName & "</Font><br>" _
& "<IMG name=""img" & vAttachNum & """" & " alt=""""" _
& " hspace=0 src=""" & vPath & Attachment.FileName _
& """ align=baseline border=0 " & "onload=""" _
& "vWidth=document.body.clientWidth;" _
& "if (" & vImg & ".width > vWidth) {" _
& vImg & ".width = vWidth;}""" _
& "><br><br><br>"
Next
Next

vHTMLBody = vHTMLBody & "</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

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

Set objShell = Nothing
Set objMsg = Nothing
Set oSelection = Nothing
Set oOL = Nothing
End Sub
 
O

Ozgur_Unlu

P_Lee

Thank you veery much. Works just fine :
Saved a lot of tim

Ozgu
Istanbul, Turkey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top