In Access 2010, this code works in sending a basic email within Access.
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.