<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff size=2>Thank
you, Andy. You are right; I was trying to stuff the whole HTML document
into the HTMLBody, and it did include pictures, not just text with picture
references. </FONT></SPAN></DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff size=2>There
seems to be two key variations to HTML email from Access, and I'm going to
experiment with both:</FONT></SPAN></DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN><SPAN class=656414913-19082003><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff size=2>1)
Using SendObject: filling up the MessageText parameter by reading
an HTML file in line by line. Pictures must be loaded on website
because SendObject doesn't allow creation of email attachments.
This has attraction because I'm not limited to Outlook -- any MAPI
compliant email application will do. </FONT></SPAN></DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff size=2>2)
Using Outlook Automation: feeding the PicturePathAndFile into the
.Attachments property and the FileNameOnly into the .HTMLBody
property. The attraction here is slightly less work (you don't have
to ftp your images to your website), and the user's ability to view the email
offline (locally stored pictures).</FONT></SPAN></DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff size=2>I'll
let you know how it goes.</FONT></SPAN></DIV>
<DIV><SPAN class=656414913-19082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=656414913-19082003></SPAN><SPAN
class=656414913-19082003></SPAN><FONT size=2>Steve Capistrant<BR>Symphony
Information Services<BR>scapistrant@symphonyinfo.com<BR>Phone:
612-333-1311<BR>www.symphonyinfo.com<BR>212 3rd Ave N, Ste 404<BR>Minneapolis,
MN 55401<BR></DIV></FONT>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Andy
Lacey<BR><B>Sent:</B> Tuesday, August 19, 2003 3:14 AM<BR><B>To:</B> 'Access
Developers discussion and problem solving'<BR><B>Subject:</B> RE: [AccessD] HTML
Email from Access - Progress<BR><BR></FONT></DIV>
<DIV><SPAN class=193080608-19082003><FONT face=Arial color=#0000ff size=2>Hi
Steve</FONT></SPAN></DIV>
<DIV><SPAN class=193080608-19082003><FONT face=Arial color=#0000ff size=2>Well I
never followed it through to an actual implementation, cos I didn't need to. But
when you say "the HTML document gets presented as an attachment" do you mean a
picture or the whole document. I certainly generated an HTML email but pictures
are a problem because the picture in html is only a reference to a file. So the
file has to be availble to the recipient and, as I see it, there are two ways to
do that. Firstly is to put the pic(s) on a web site and make your html point to
that. That works beautifully and seems to be what's done on the advertising
emails I get. The second method is to send the pics along as attachments and
point the html to them. This is Brett's approach below. And it seems that if you
strip all path info from the picture's file reference then it defaults to
pointing to the attachment.</FONT></SPAN></DIV>
<DIV><SPAN class=193080608-19082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=193080608-19082003><FONT face=Arial color=#0000ff size=2>HTH.
If you're trying the second method and it's not working post the code and we'll
try to help.</FONT></SPAN></DIV>
<DIV><SPAN class=193080608-19082003><FONT face=Arial color=#0000ff size=2><!-- Converted from text/plain format -->
<P><FONT size=2>Andy Lacey<BR><A
href="http://www.minstersystems.co.uk/">http://www.minstersystems.co.uk</A>
</FONT></P></FONT></SPAN></DIV>
<DIV><SPAN class=193080608-19082003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Steve
Capistrant<BR><B>Sent:</B> 19 August 2003 01:39<BR><B>To:</B> Access
Developers discussion and problem solving<BR><B>Subject:</B> RE: [AccessD]
HTML Email from Access - Progress<BR><BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003>Andy,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003>Picked up this old horse. I'm trying to repeat
your success...getting closer.....</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=917461800-19082003>When
I use Brett's code (see below), I have two problems.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=917461800-19082003>1)
the HTML document gets presented as an attachment (rather than displayed in
the body).</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=917461800-19082003>2)
the email when received has the attachment stripped off.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003></SPAN></FONT><FONT face=Arial color=#0000ff
size=2><SPAN class=917461800-19082003>Are you doing something different than
the code is it shows here?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003>Thanks.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=917461800-19082003></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=917461800-19082003>S</SPAN>teve
Capistrant<BR>Symphony Information
Services<BR>scapistrant@symphonyinfo.com<BR>Phone:
612-333-1311<BR>www.symphonyinfo.com<BR>212 3rd Ave N, Ste 404<BR>Minneapolis,
MN 55401<BR></FONT></DIV>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com]<B>On Behalf Of </B>Andy
Lacey<BR><B>Sent:</B> Wednesday, July 30, 2003 3:07 PM<BR><B>To:</B> 'Access
Developers discussion and problem solving'<BR><B>Subject:</B> RE: [AccessD]
HTML Email from Access - Progress<BR><BR></FONT></DIV>
<DIV><SPAN class=158260020-30072003><FONT face=Arial color=#0000ff size=2>Well
I feel reasonably confident now going into my meeting on Saturday. I've
created an html email in Outlook from Access by reading an html page knocked
up in Frontpage. Just read it in line by line and built up a string. I'm
confident about Arthur's method of merging data from a contact database, and
pics (if required) would be bast stored on the web but could be sent as per
Brett's method. Kewl. And all in a day starting from having no idea. This list
rocks. Thanks everyone.</FONT></SPAN></DIV>
<DIV><SPAN class=158260020-30072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=158260020-30072003><!-- Converted from text/plain format -->
<P><FONT size=2>Andy Lacey<BR><A
href="http://www.minstersystems.co.uk/">http://www.minstersystems.co.uk</A>
</FONT></P></SPAN></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Brett
Barabash<BR><B>Sent:</B> 30 July 2003 20:43<BR><B>To:</B> 'Access Developers
discussion and problem solving'<BR><B>Subject:</B> RE: [AccessD] HTML Email
from Access - Progress<BR><BR></FONT></DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2>Oops! </FONT></SPAN><SPAN class=651143519-30072003><FONT
face=Arial color=#0000ff size=2>Let's try this again:</FONT></SPAN></DIV>
<DIV><SPAN class=651143519-30072003>
<DIV><SPAN class=541000018-30072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=541000018-30072003><FONT face=Arial color=#0000ff
size=2>Public Sub CreatePictureMail(ByVal strPicPath As
String)</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=541000018-30072003><FONT face=Arial color=#0000ff
size=2> Dim olItem As Outlook.MailItem</FONT></SPAN></DIV>
<DIV><SPAN class=541000018-30072003><SPAN
class=651143519-30072003></SPAN><FONT face=Arial color=#0000ff
size=2> <SPAN class=651143519-30072003> Dim strFileName As
String</SPAN><BR></FONT></SPAN></DIV>
<DIV><SPAN class=541000018-30072003><FONT face=Arial><FONT
color=#0000ff><FONT size=2><SPAN class=651143519-30072003>
strFileName = Mid$(strPicPath, InStrRev(strPicPath,"\") +
1)</SPAN></FONT></FONT></FONT></SPAN></DIV><SPAN
class=541000018-30072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=651143519-30072003><SPAN class=541000018-30072003><FONT
face=Arial color=#0000ff size=2>
<DIV><BR> Set olItem =
Application.CreateItem(olMailItem)<BR>
olItem.Attachments.Add strPicPath</FONT></SPAN></SPAN><SPAN
class=651143519-30072003><SPAN class=541000018-30072003><FONT face=Arial
color=#0000ff size=2><BR> olItem.HTMLBody =
"<html><img src=" & Chr$(34) & strFileName &
Chr$(34) & "></html>"<BR>
olItem.Display<BR> <BR> Set olItem =
Nothing</FONT></SPAN></DIV></DIV>
<DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=541000018-30072003><FONT face=Arial color=#0000ff
size=2>End Sub</FONT></SPAN></DIV></SPAN></DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2>The trick is that if you just supply the filename without a complete
path, the mail client should default to using the attachment directory
path. (I have only tried this in Outlook, so I would be very
interested to hear if it works in all clients). I goofed up and
included the entire path in my original code.</FONT></SPAN></DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2>Also, you could certainly have a tag like:</FONT></SPAN></DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2><IMG
SRC="www.mydomain.com/images/pic1.jpg"></FONT></SPAN></DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=651143519-30072003><FONT face=Arial color=#0000ff
size=2>This is probably a little more courteous, as it doesn't clog up the
recipient's mailbox. Also, savvy email marketers (or
relentless spammers) have counters on their web servers to
determine how many of the messages actually get opened by counting the
number of times the graphic is
downloaded.</FONT></SPAN></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>