BCC Email

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 = "[email protected], [email protected],"
& _
"[email protected], [email protected],
[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, , 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
 
D

Daniel Pineault

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 = "[email protected]; [email protected];"
& _
"[email protected]; [email protected];
[email protected]"
SendBCC ="[email protected];[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
 
S

Stockwell43

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!!!!!
 
Top