A Microsoft Outlook email forum. Outlook Banter

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 » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

A macro to show images



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 8th 07, 03:24 PM posted to microsoft.public.outlook.program_addins
Equilibrium
external usenet poster
 
Posts: 1
Default 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.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 dont show the attached images automatically? AndreasMamute Outlook - Installation 1 November 3rd 06 08:21 PM
Office Outlooks dont show embeded images in HTML format mail tom Outlook - General Queries 0 October 30th 06 08:13 PM
Call macro stored in Excel workbook from Outlook's macro Gvaram Outlook and VBA 5 October 4th 06 06:26 AM
create macro to show file size in outlook john mcmichael Outlook and VBA 3 May 2nd 06 09:55 PM
Images do not show up in outlook express x64 Martin G Outlook Express 3 March 24th 06 01:27 AM


All times are GMT +1. The time now is 12:29 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-2025 Outlook Banter.
The comments are property of their posters.