I have a form that sends emails with the On_Click Event of a command button using this code.
This works well accept It would be helpful if those receiving the emails could not see the others email address. How do I send more than one BCC?
Code:
Private Sub Confirm_Click()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
On Error Resume Next
With OutMail
.Body = "Thank you for accepting a Transport on" & vbNewLine & Me.TBtransportdate.Value _
& " at " & Me.TBtransporttime.Value & " for " _
& Me.TBDuration.Value & " Hours." & vbNewLine & "Transport # " _
& Me.TBID.Value & vbNewLine & "There will not be a reminder about this transport."
.Subject = "Confirmation of Transport"
.To = DLookup("Email", "TBLCasualStaff", "Staff = '" & Me.CBStaff1.Value & "'")
.BCC = DLookup("Email", "TBLCasualStaff", "Staff = '" & Me.CBStaff2.Value & "'")
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
DoCmd.Close
End Sub
This works well accept It would be helpful if those receiving the emails could not see the others email address. How do I send more than one BCC?