BCC Email

  • Thread starter Thread starter Stockwell43
  • Start date Start date
S

Stockwell43

Hello,

I hate to ask this again but I didn't get a response so I thought I would
post my code to help decipher my issue. Below is the code I have in a Command
Button and it works perfectly! All I want is to be able to add two people as
BCC and I tried everything but it won't work. If I use the macro it will work
but none of my other information shows. Any help is most apreciated!

Thanks!!!!

Private Sub Command39_Click()
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
End Sub
 
1- for your TO, CC, BCC separate multiple recipients with ; and not , as per
the help file.

2- Try the code below it should work fine.


Private Sub Command39_Click()
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)"
SendBCC ="(e-mail address removed);[email protected]"

MySubject = "Additional Information Needed"
MyMessage = Me.LoanNumber & vbCr & Me.CustomerFirst & " " &
Me.CustomerLast & vbCr & Me.ErrorCode & _
vbCr & Me.Comments
DoCmd.SendObject acSendNoObject, , , SendTo, SendCC, SendBCC, MySubject,
MyMessage, True

EH:
If Err.Number = 2501 Then
MsgBox "This email message has not been sent. Message has been
cancelled."
End If
End Sub
 
You my friend are a genius!!!!! Your code works perfectly and I send a
thousand thank you's!

I saved it in my folder for future use. Never know if I might need to create
something like this again.

Thank again Daniel and have a great day!!!!!
 
Back
Top