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 » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Image not displaying when applying stationery via code



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old November 22nd 07, 06:22 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Image not displaying when applying stationery via code



You need to embed the image. You could do that by creating the stationary
via Outlook. If you want to do it by code, here's a sample. The description
isn't translated, simply run the first Public procedure and see what
happens. You need the Redemption (www.dimastr.com) for running the sample.

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Color Categories & Ensure that Every Item Gets Categorized:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Wed, 21 Nov 2007 22:33:34 -0000 schrieb 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 = "
.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

 




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
No image when stationery applied via code John Outlook - General Queries 2 January 23rd 08 04:56 AM
No image when stationery applied via code John Outlook and VBA 2 January 23rd 08 04:56 AM
Image not displaying when applying stationery via code John Outlook - General Queries 0 November 21st 07 10:33 PM
Image not displaying when applying stationery via code John Outlook - Installation 0 November 21st 07 10:33 PM
Background image in stationery John Outlook - General Queries 0 November 17th 07 03:29 AM


All times are GMT +1. The time now is 03:35 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.