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 = "(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
 
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 = "(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
 
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!!!!!
 

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

Similar Threads

Email problem 5
Email Issue 1
Email issue 0
Error on sending email 2
SendObject Email 2
Bold Code 2
Emailing with field name in body of email 7
Email Help 17

Top