sending email through Access (1 Viewer)

crowegreg

Registered User.
Local time
Today, 10:36
Joined
Feb 28, 2011
Messages
108
Dim objAccount As Outlook.Account
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.mailitem

'Determine the correct account
For Each objAccount In Outlook.Application.Session.Accounts

If objAccount = "Dispatch - Safecarautotransport.com" Then

'Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
'Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
.To = "greglcrowe@gmail.com"
.SendUsingAccount = objAccount
.Subject = "Safe Car Auto Transport Quote"
'.Body = "This is the body of the message." & vbCrLf & vbCrLf
.Send
End With
End If

Next

Set objOutlook = Nothing
Set objAccount = Nothing
Set objOutlookMsg = Nothing

My question is how to add formatting to the text within the body area? I can't figure out the syntax.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 09:36
Joined
Aug 30, 2003
Messages
36,133
Use

.HTMLBody

And include HTML tags for your desired formatting.
 

Users who are viewing this thread

Top Bottom