On Sat, 06 Sep 2003 23:31:14 GMT, Chuck Grimsby
<c.grimsby@worldnet.att.net.invalid> wrote:
Chuck,
Thanks tons for your prolific effort here. I am remiss in allowing
you to think it was more complicated than it was. As it turns out,
all I had to do was to change the .body property to the .HTMLBody
property and wham -- it worked like a champ! I always feel a little
foolish when I discover a solution after I've been stumped for a
while. After 22 years in the IT business, I still get stumped by
these computers now and then.
[color=blue]
>The only way to do this William, is to "build" a HTML page on your
>drive (preferably in the *user's* temp directory), then read it back
>in as a string to place in the .Body property of the OutLook message.
>You may want to visit
http://www.slipstick.com/ for some examples.
>(It's been a while since I've been there, so I'm not certain that they
>have any, but they used to. CDOHelp.org used have code samples as
>well, and probably the *best* set of examples of how to do anything
>with Outlook, but they seem to be gone now.)
>
>A far simpler way to do this would be to build your own SMTP server in
>Access so you don't have to bother with the user's EMail program at
>all. Search this newsgroup at Google for SMTP and you'll find code
>that I've posted in the past that does this. (It's very simple,
>actually! I just hate posting the same code over and over again...)
>
>If you're unfamiliar with creating valid HTML pages, find someone who
>is, who can hopefully build you a "example" page that you can use as a
>template. (If you have to build this yourself, visit
>
http://www.htmlgoodies.com/ for help in how to do basic web pages.
>It's a great beginner's site.)
>
>You will have to also .Attachment the PDF file, and any graphic images
>you want to appear as well.
>
>With the above in mind, I want to caution you about a few things.
>First (if you insist on using OutLook), make sure your EMail server
>will allow you to send files as large as you are going to be sending
>out. Not all EMail servers do! Nor do all EMail servers allow
>*incoming* messages that are over a certain size.
>
>Some EMail servers won't allow HTML messages of any kind due to all
>the viruses that target OutLook users. Turning off HTML EMail is
>usually the safest (and cheapest) way to deal with the virus problem,
>so it's becoming more and more popular. Some users turn this off
>themselves as well.
>
>Lastly, if the information you are sending out is in *any* way
>confidential, remember that EMail is *NOT* secure in any way, shape or
>form. Unless the PDF file you are sending is Read password protected
>(the user has to type in a password to see what's in the file), you
>could not only be breaking several laws, but also be setting yourself
>(and/or your company) up for quite a lawsuit which you will have no
>hope whatsoever of winning.
>
>On Sat, 06 Sep 2003 17:26:02 -0500, William Case <No@address.com>
>wrote:
>[color=green]
>>Pieter, Thanks for this response. I have a similar challenge, except
>>that all I want to do is insert and HTML encoded message into Outlook
>>in such a way that the HTML is rendered properly for display when the
>>message is sent, just like it would be if you switched to HTML mode in
>>Outlook (not Outlook Express) and entered the message manually
>>complete with all formatting, colors, fonts, etc. Right now I'm able
>>to send text messages (including HTML code to Outlook from an Access
>>2K procedure that uses late binding to manipulate the OL object
>>moc\del. But when I send HTML code to Outlook, the HTML tags all
>>appear in the body of the message instead of being converted to
>>readable format. I DO have Outlook set up to default to HTML for new
>>messages.[/color]
>[color=green]
>>On 6 Sep 2003 15:13:33 -0700,
pietlinden@hotmail.com (Pieter Linden)
>>wrote:[/color]
>[color=green][color=darkred]
>>>MLH <CRCI@NorthState.net> wrote in message news:<gkrjlv01eqnb7kuc3u7vjiir8ct69n1sia@4ax.com>. ..
>>>> I print to a device that creates a PDF. Knowing the filename, how can
>>>> I then embed the PDF into the body text of an OutLook Express outbound
>>>> email & send to a specified address in a table? I want recipient
>>>> addressees to see the report in the body text window of their email
>>>> when they open it. I was thinking also about attaching the PDF file to
>>>> the eMail for those having "text only" email software. I need to
>>>> automate both of these tasks from a VB procedure. IDEAS?[/color][/color]
>[color=green][color=darkred]
>>>Express does not expose any objects, so you cannot automate it
>>>directly. You might be able to do it using the CDO libraries or
>>>something. You should be able to find something like that at the MS
>>>website. Look for something like "CDONTS.DLL". If I remember right,
>>>it's just a MAPI wrapper, so it should work. Then once you have that
>>>installed and registered, doing what you ask is trivial.[/color][/color]
>[color=green][color=darkred]
>>>In a sub/function do the following:
>>>Create a new mail message.
>>>Specify the body text. Not sure how you'd paste in the PDF, though.
>>>If you were adding normal text, it would be a snap.
>>>Add any attachments you want. (the PDF)
>>>specify the recipients... open a recordset of recipients inside your
>>>function (or pass it in as an argument), then loop through them adding
>>>them to the Recipients collection.
>>>When everything is the way you want it, issue the .Send command of the
>>>message object.[/color][/color][/color]