PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Sending HTML Email Programatically using Outlook 2002

Reply

Sending HTML Email Programatically using Outlook 2002

 
Thread Tools Rate Thread
Old 18-02-2004, 01:21 PM   #1
Microsoft
Guest
 
Posts: n/a
Default Sending HTML Email Programatically using Outlook 2002


The following code used to work fine in Outlook 2000, now with Outlook 2002
it doesn't. Now it leaves a BLANK body.
Can anyone tell me why this no longer works? Also, we try the same thing
with an RTF type file as the body (.body property), and it just puts junk in
the body and does not interpret it as a RTF file.

Thanks.

Bob

*****************************************************

oOutlook = CREATEOBJECT("outlook.application")
oMail = oOutLook.CreateItem(0)

WITH oMail

oRecipient = .Recipients.Add("test@test.com")
oRecipient.type = 1

.Subject = "THIS IS A TEST"

.bodyformat = 2 && This new property doesn't seem to have any effect on
a send.

.HTMLBody = "<HTML><H2>My HTML page.</H2><BODY>My body.</BODY></HTML>"
.send

ENDWITH






  Reply With Quote
Old 18-02-2004, 04:00 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Sending HTML Email Programatically using Outlook 2002

Do you have the latest IE updates installed? There was an issue with
some earlier updates for IE that screwed up the HTML rendering engine.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Microsoft" <jmail@marketware.us> wrote in message
news:u36PTIi9DHA.2760@TK2MSFTNGP09.phx.gbl...
> The following code used to work fine in Outlook 2000, now with

Outlook 2002
> it doesn't. Now it leaves a BLANK body.
> Can anyone tell me why this no longer works? Also, we try the same

thing
> with an RTF type file as the body (.body property), and it just puts

junk in
> the body and does not interpret it as a RTF file.
>
> Thanks.
>
> Bob
>
> *****************************************************
>
> oOutlook = CREATEOBJECT("outlook.application")
> oMail = oOutLook.CreateItem(0)
>
> WITH oMail
>
> oRecipient = .Recipients.Add("test@test.com")
> oRecipient.type = 1
>
> .Subject = "THIS IS A TEST"
>
> .bodyformat = 2 && This new property doesn't seem to have any

effect on
> a send.
>
> .HTMLBody = "<HTML><H2>My HTML page.</H2><BODY>My

body.</BODY></HTML>"
> .send
>
> ENDWITH
>
>
>
>
>
>



  Reply With Quote
Old 18-02-2004, 05:15 PM   #3
Bob Bartel
Guest
 
Posts: n/a
Default Re: Sending HTML Email Programatically using Outlook 2002

How do get the lastest?

It is doing it on more than one PC here, both are running XP and we are
getting updates from Microsoft using their update service.

Bob



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  Reply With Quote
Old 18-02-2004, 09:46 PM   #4
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Sending HTML Email Programatically using Outlook 2002

Windows Update would have the latest versions available.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Bob Bartel" <bob@marketware.us> wrote in message
news:%236KhXLk9DHA.3648@TK2MSFTNGP11.phx.gbl...
> How do get the lastest?
>
> It is doing it on more than one PC here, both are running XP and we

are
> getting updates from Microsoft using their update service.
>
> Bob
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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