design new mail from code in access

R

rach

hi,
i have this code:
Dim objOutlook As Outlook.Application
Dim objMail As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim db As Database
Dim msg As String

Set db = CurrentDb()
Set objOutlook = New Outlook.Application
Set objMail = objOutlook.CreateItem(olMailItem)
msg = "hello," & vbcrlf & "good morning""
With objMail
Set objOutlookRecip = .Recipients.Add(Email)
.Display
.Subject = "hello"
.Body = msg
end with


i want to align it (the body) to right to set the font, add a picture etc' ,
how can i design this mail?
 
D

Dmitry Streblechenko

Instead of using the Body property, set the HTMLBody property to the
appropriately formatted HTML string.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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