Error sending email and editing email's body

G

Greg

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
 
D

Douglas J. Steele

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top