Sending HTML email with Access 2000

S

SAC

I'd like to send html email with access 2000.

I understand how to send regular text using the Outlook library, but how can
I send html in the body?

I saw a referent to a property of .BodyFormat but maybe Acesss 2000 doesn't
support this.

What can I do?

Thanks.
 
R

Rick Brandt

SAC said:
I'd like to send html email with access 2000.

I understand how to send regular text using the Outlook library, but
how can I send html in the body?

I saw a referent to a property of .BodyFormat but maybe Acesss 2000
doesn't support this.

What can I do?

If you are automating Outlook then you just use HTMLbody instead of Body.
 
D

David C. Holley

Set a Reference to the MicroSoft Outlook 11.0 Object Library Then add
the following code...

Dim objOutlook As Outlook.Application
Dim newMail As Outlook.MailItem

Set objOutlook = CreateObject("Outlook.application")
Set newMail = objOutlook.CreateItem(olMailItem)

With newMail
.BodyFormat = olFormatHTML
.HTMLBody = "<HTML><H2>The body of this message will appear in
HTML.</H2><BODY>Type the message text here. </BODY></HTML>"
(other properties)
.Send
end With

Set newMail = Nothing
Set objOutlook = Nothing

For the rest of the MailItem properties, open Outlook go to the Visual
Basic Editor and look in HELP for the OUTLOOK OBJECT MODEL then objects
- MailItem
 
R

Rick Brandt

David said:
Set a Reference to the MicroSoft Outlook 11.0 Object Library Then add
the following code...

Or use late binding so you don't need a reference and it works with all
versions of Outlook.

External references should (almost) never be used in an Access app.
 
D

David C. Holley

Habits....

Rick said:
Or use late binding so you don't need a reference and it works with all
versions of Outlook.

External references should (almost) never be used in an Access app.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top