The following code works great for sending a report to many addressees (recordset). I want to extract another e-mail for the Bcc copies. I'm not sure how to add it to the current code.
Dim rs As Recordset
Dim vRecipientList As String
Dim vMsg As String
Dim vSubject As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM qry91To120DaysFromPDDEmail2")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do
If Not IsNull(rs!CCF_EMail) Then
vRecipientList = vRecipientList & rs!CCF_EMail & ";"
rs.MoveNext
Else
rs.MoveNext
End If
Loop Until rs.EOF
vMsg = " Your Message here... "
vSubject = " Your Subject here... "
DoCmd.SendObject acSendReport, "rpt61To90DaysFromPDDUnitNotification", acFormatPDF, vRecipientList, vRecipientList2, , , vSubject, vMsg, True
MsgBox ("Report successfully eMailed!")
Else
MsgBox "No contacts."
End If
==============
Dim rs As Recordset
Dim vRecipientList As String
Dim vMsg As String
Dim vSubject As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM qry91To120DaysFromPDDEmail2")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do
If Not IsNull(rs!CCF_EMail) Then
vRecipientList = vRecipientList & rs!CCF_EMail & ";"
rs.MoveNext
Else
rs.MoveNext
End If
Loop Until rs.EOF
vMsg = " Your Message here... "
vSubject = " Your Subject here... "
DoCmd.SendObject acSendReport, "rpt61To90DaysFromPDDUnitNotification", acFormatPDF, vRecipientList, vRecipientList2, , , vSubject, vMsg, True
MsgBox ("Report successfully eMailed!")
Else
MsgBox "No contacts."
End If
==============