S
Stockwell43
Hello,
I am trying to put in 5 five names in the SendCC and it works fine for the
first three but when I drop to the next line to add the other two, I get a
syntax compile error and the last two name appear in red. Could someone
please help me. I'm sure I am not adding something in the code but don't know
what.
Here is the code I am using:
On Error GoTo EH
Dim SendTo As String, SendCC As String, MySubject As String, MyMessage
As String
SendTo = ""
SendCC = "(e-mail address removed),
(e-mail address removed), (e-mail address removed) &_"
(e-mail address removed), (e-mail address removed)"
MySubject = "Additional Information Needed"
MyMessage = Me.LoanNumber & vbCr & Me.CustomerFirst & " " &
Me.CustomerLast & vbCr & Me.ErrorCode & _
vbCr & Me.Comments
DoCmd.SendObject acSendNoObject, , , SendTo, SendCC, , MySubject,
MyMessage, True
EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If
Thanks!!
I am trying to put in 5 five names in the SendCC and it works fine for the
first three but when I drop to the next line to add the other two, I get a
syntax compile error and the last two name appear in red. Could someone
please help me. I'm sure I am not adding something in the code but don't know
what.
Here is the code I am using:
On Error GoTo EH
Dim SendTo As String, SendCC As String, MySubject As String, MyMessage
As String
SendTo = ""
SendCC = "(e-mail address removed),
(e-mail address removed), (e-mail address removed) &_"
(e-mail address removed), (e-mail address removed)"
MySubject = "Additional Information Needed"
MyMessage = Me.LoanNumber & vbCr & Me.CustomerFirst & " " &
Me.CustomerLast & vbCr & Me.ErrorCode & _
vbCr & Me.Comments
DoCmd.SendObject acSendNoObject, , , SendTo, SendCC, , MySubject,
MyMessage, True
EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If
Thanks!!