I don't know if anyone else has had a problem with the boring-ness of plain text emails. The following is code that works. I'm sure the moderators will delete if it's not a worthwhile post for the forum.
Step 1
Set up your mail as a string with the html code embedded. You can use bold and
Step 1
Set up your mail as a string with the html code embedded. You can use bold and
- ordered lists and
- list items e.g.
hardcode = "
The IRC Cover page indicates that the policy is due for review.
The version of the policy currently being used by the university can be viewed by clicking on the following link. http://put link here!
"
hardcode = hardcode & "
Please ignore this message if the Policy is currently under review.
"
Body = line1 & hardcode
Step 2
Put all your text into the HTML body tag (you can use headings as well - I didn't need them)
Body = "" & Body & ""
Step 3
Add the .BodyFormat and .HTMLBody to your outlook call
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = emailaddress
.CC = CC
.BCC = ""
.Subject = Subject
.BodyFormat = olFormatHTML '2 'old Format HTML
.HTMLBody = Body
.Send
End With
On Error GoTo 0
'MsgBox "Send successful, Thank you " & filepathname & flname & " sent to " & emailaddress
Set OutMail = Nothing
Set OutApp = Nothing
DoCmd.SetWarnings True
Exit_Sendemail:
Exit Sub
Err_Sendemail:
MsgBox Err.Description
Resume Exit_Sendemail:
End Sub