Image not displaying when applying stationery via code

J

John

Hi

I am assigning stationery via code to a new email as below. The problem is
that the image included in stationery does not appear in the sent mail. What
is the problem and how can I fix it? There must be someone who has done this
sort of thing, and outlook being around for so long someone must have
figured a way to do this.

Thanks

Regards


Code
====

Set fso = CreateObject("Scripting.FileSystemObject")
Set Ts = fso.OpenTextFile("F:\Email Stationery\Email_Template.htm", 1)

Set OutlookApp = New Outlook.Application
Set EM = OutlookApp.CreateItem(olMailItem)

With EM
.To = "(e-mail address removed)"
.Subject = "Any Subject"
.HTMLBody = Ts.ReadAll
.Send
End With


Content of F:\Email Stationery\Email_Template.htm
==================================

<HTML>
<HEAD>
</HEAD>
<BODY>
<img src="file:///F|/MyFolder/MyImage.jpg" width="89" height="59">
</body>
</HTML>
 
Joined
Nov 26, 2007
Messages
4
Reaction score
0
John,

Looking at your code the issue would be:

<img src="file:///F|/MyFolder/MyImage.jpg" width="89" height="59">


The user does not necessarily have an F drive or the image stored in that folder. In order for it to work the image would have to be somewhere anyone could get to it.

Steve
 

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