![]() |
A macro to show images
I've used a macro to show images in outllok 2003 , this is the macro:
************************************************** ************************************************** *************** 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 = "HTMLtitleView Email Attachments/title" For Each obj In oSelection vSubject = "FONT face=Arial size=3Attachments from: b" _ & obj.Subject & "/bbr" vHTMLBody = vHTMLBody & vSubject For Each Attachment In obj.Attachments Attachment.SaveAsFile (vPath & Attachment.FileName) vHTMLBody = vHTMLBody & Attachment.FileName & "/Fontbr" & _ "IMG alt="""" hspace=0 src=""" & vPath & Attachment.FileName & _ """ align=baseline border=0brbrbr" 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 ************************************************** ************************************************** *************** but the output is a browser window with image sign and not the actual image. pasting the generated code of this page & saving to a new web html page can be watched succesfully in a web browser. Why? Please assist. |
All times are GMT +1. The time now is 12:25 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com