Format text in an automatic email

Psiren17

Registered User.
Local time
Today, 06:04
Joined
Nov 18, 2005
Messages
31
I am using the following code to send emails from Access. Is there any way to format the text in these emails? At the moment they just come out as a big long line of text and i would like to be able to put the text in different rows, maybe change colours etc. Any help would be appreciated!

Private Sub BTN_SAVESEND_Click()
On Error GoTo Err_BTN_SAVESEND_Click

strto = Me.Requestor_CDS_ID_

DoCmd.SendObject , , , strto & "@companyname.com", , , "Your Metrology Request: Job Number " & Me![Job number:] & " has been received.", "Your request will be completed as soon as possible and you will be notified by email when it is completed. ", False

Exit_BTN_SAVESEND_Click:
Exit Sub

Err_BTN_SAVESEND_Click:
MsgBox Err.Description
Resume Exit_BTN_SAVESEND_Click

End Sub
 
Different lines is easy; just concatenate in vbCrLf wherever you want a carriage return. Color will be trickier; I think you'll need to switch from SendObject to Outlook Automation so you can use HTML in the body of the email. Searching on that should turn up the code.
 
What does this mean?

"concatenate in vbCrLf "
 
"Whatever" & vbCrLf & "Whatever"
 

Users who are viewing this thread

Back
Top Bottom