View Single Post
  #2  
Old May 7th 07, 07:03 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default design new mail from code in access

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

"rach" wrote in message
...
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?



Ads