Advice or suggestions would be appreciated.
I have a sub to send emails to a number of members, which performs how i desire . There is a but and that is ,I need to send blind copies "bcc"
How would I achieve my aim using my current script below:
#Private Sub SendeMail()
Dim rs As Recordset
Dim vRecipientList As String
Dim vMsg As String
Dim vSubject As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM qryemailcontact")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do
If Not IsNull(rs!EmailAddress) Then
vRecipientList = vRecipientList & rs!EmailAddress & ";"
rs.MoveNext
Else
rs.MoveNext
End If
Loop Until rs.EOF
vMsg = "Your Reference is" & " " & Me.FFIDNO & " " & Me.txtMessage.Value
vSubject = Me.txtSubject.Value '"Your Subject here 255 Characters ..."
DoCmd.SetWarnings False
DoCmd.SendObject , , acFormatRTF, vRecipientList, , , vSubject, vMsg, False, False
MsgBox ("Email successfully eMailed!")
DoCmd.SetWarnings True
Else
MsgBox "No contacts."
End If
End Sub#
Regards Ypma
I have a sub to send emails to a number of members, which performs how i desire . There is a but and that is ,I need to send blind copies "bcc"
How would I achieve my aim using my current script below:
#Private Sub SendeMail()
Dim rs As Recordset
Dim vRecipientList As String
Dim vMsg As String
Dim vSubject As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM qryemailcontact")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do
If Not IsNull(rs!EmailAddress) Then
vRecipientList = vRecipientList & rs!EmailAddress & ";"
rs.MoveNext
Else
rs.MoveNext
End If
Loop Until rs.EOF
vMsg = "Your Reference is" & " " & Me.FFIDNO & " " & Me.txtMessage.Value
vSubject = Me.txtSubject.Value '"Your Subject here 255 Characters ..."
DoCmd.SetWarnings False
DoCmd.SendObject , , acFormatRTF, vRecipientList, , , vSubject, vMsg, False, False
MsgBox ("Email successfully eMailed!")
DoCmd.SetWarnings True
Else
MsgBox "No contacts."
End If
End Sub#
Regards Ypma