Error sending email and editing email's body

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following function

Private Sub SendEmail_Click()
Dim strSubject As String
Dim strEmailList As String
Dim strMessage As String
Dim strMessage2 As String


On Error GoTo Err_SendEmail_Click
strSubject = "Please investigate" & " " & [Ticket #]
strEmailList = "(e-mail address removed) "
strMessage = Me.Text_Description
strMessage2 = "Assign to:"
DoCmd.SendObject acSendNoObject, , acFormatRTF, strEmailList, , ,
strSubject, strMessage, strMessage2

Exit_SendEmail_Click:
Exit Sub

Err_SendEmail_Click:
MsgBox Err.Description
Resume Exit_SendEmail_Click



End Sub

First -- I am getting error message: An expression you entered is wrong data
type for one of the arguments. How do I fix that?

Is it possible to:
place srtMessage2 in a line below strMessage?
Can I set different font and size in body of my email by adding code to this
function? For example can I make body of my email bold for exp?

Thanks a lot
 
Where you've currently got strMessage2 is supposed to be a boolean field
indicating whether or not you want to edit the message before sending it.
Use True (-1) to open the electronic mail application immediately with the
message loaded, so the message can be edited. Use False (0) to send the
message without editing it. If you leave this argument blank, the default
(True) is assumed.
 
Back
Top