![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi
I am applying stationary to my outgoing email message when sending mail via code. The exact code is given at the end. The problem is that the image doe snot appear in the stationery at the other end. What is the problem and how can I get the image to accompany the mail as part of the stationary? I am running the code from within MS Access. Many Thanks Regards Code ==== Set OutlookApp = New Outlook.Application Set EM = OutlookApp.CreateItem(olMailItem) With EM .To = " .Subject = "Any Subject" .HTMLBody = HTMLTextAndSignature("This is body text") .Display (False) End With Function HTMLTextAndSignature(EmailBody) As String Dim fso Dim Ts Dim Signature As String Set fso = CreateObject("Scripting.FileSystemObject") Set Ts = fso.OpenTextFile("F:\Email Stationery\Email_Template.htm", 1) Signature = Ts.ReadAll ' [Body] is a tag in html file as a placeholder to actual body text , [Body] is replaced with actual body text here If IsNull(EmailBody) Then Signature = Replace(Signature, "[Body]", " ") Else Signature = Replace(Signature, "[Body]", EmailBody) End If HTMLTextAndSignature = Signature End Function Content of Email_Template.htm, the image that does not display is F:/Email Stationery/investor+small.jpg ================================================== ==================== !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTML HEAD META http-equiv=Content-Type content="text/html; charset=windows-1252" style type="text/css" !-- body { background-attachment: fixed; background-color: "#FFFFFF"; background-repeat: no-repeat; font-family: "Century Gothic"; font-size: 10pt; font-weight: normal; } -- /style /HEAD BODY BACKGROUND="file:///F|/Email Stationery/E.jpg" bgcolor="#FFFFFF" table border=0 summary="" tr td width="464" DIV align=left My NameBR /DIV /td td width="70" valign="bottom"br img src="file:///F|/Email Stationery/investor+small.jpg" width="89" height="59" /td /tr /table /body /HTML |
#2
|
|||
|
|||
![]()
John,
Your html code is linking to the graphic on your system. Since outside folks don't have access to your system, it comes up blank. If you can park the graphic on a web-site somewhere and reference that URL in your code, your image will link from every message that's sent out. Bruce "John" wrote: Hi I am applying stationary to my outgoing email message when sending mail via code. The exact code is given at the end. The problem is that the image doe snot appear in the stationery at the other end. What is the problem and how can I get the image to accompany the mail as part of the stationary? I am running the code from within MS Access. Many Thanks Regards Code ==== Set OutlookApp = New Outlook.Application Set EM = OutlookApp.CreateItem(olMailItem) With EM .To = " .Subject = "Any Subject" .HTMLBody = HTMLTextAndSignature("This is body text") .Display (False) End With Function HTMLTextAndSignature(EmailBody) As String Dim fso Dim Ts Dim Signature As String Set fso = CreateObject("Scripting.FileSystemObject") Set Ts = fso.OpenTextFile("F:\Email Stationery\Email_Template.htm", 1) Signature = Ts.ReadAll ' [Body] is a tag in html file as a placeholder to actual body text , [Body] is replaced with actual body text here If IsNull(EmailBody) Then Signature = Replace(Signature, "[Body]", " ") Else Signature = Replace(Signature, "[Body]", EmailBody) End If HTMLTextAndSignature = Signature End Function Content of Email_Template.htm, the image that does not display is F:/Email Stationery/investor+small.jpg ================================================== ==================== !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" HTML HEAD META http-equiv=Content-Type content="text/html; charset=windows-1252" style type="text/css" !-- body { background-attachment: fixed; background-color: "#FFFFFF"; background-repeat: no-repeat; font-family: "Century Gothic"; font-size: 10pt; font-weight: normal; } -- /style /HEAD BODY BACKGROUND="file:///F|/Email Stationery/E.jpg" bgcolor="#FFFFFF" table border=0 summary="" tr td width="464" DIV align=left My NameBR /DIV /td td width="70" valign="bottom"br img src="file:///F|/Email Stationery/investor+small.jpg" width="89" height="59" /td /tr /table /body /HTML |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
No image when stationery applied via code | John | Outlook - General Queries | 2 | January 23rd 08 05:56 AM |
Stationery background image problem | John | Outlook - General Queries | 3 | November 17th 07 09:41 PM |
Stationery background image problem | John | Outlook - Installation | 3 | November 17th 07 09:41 PM |
Background image in stationery | John | Outlook - General Queries | 0 | November 17th 07 04:29 AM |
No email stationery when through code | John | Outlook - General Queries | 2 | September 21st 06 12:02 PM |