Sending Email to a number members (1 Viewer)

ypma

Registered User.
Local time
Today, 20:19
Joined
Apr 13, 2012
Messages
643
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
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:19
Joined
Oct 29, 2018
Messages
21,454
Hi. Try changing this line:
Code:
DoCmd.SendObject , , acFormatRTF, vRecipientList, , , vSubject, vMsg, False, False
into something like this:
Code:
DoCmd.SendObject , , acFormatRTF, "your@address.here", , vRecipientList, vSubject, vMsg, False, False
Hope it helps...
 

ypma

Registered User.
Local time
Today, 20:19
Joined
Apr 13, 2012
Messages
643
TheDBguy: Thank you for getting back to me , I think there is a misunderstanding . I will be sending to a number of members and don't
wish the other member to see who else has had a copy . bcc

I value you input so if you have another idea please let me know , i will take a look at Gasman link .

Regards Ypma
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:19
Joined
Oct 29, 2018
Messages
21,454
TheDBguy: Thank you for getting back to me , I think there is a misunderstanding . I will be sending to a number of members and don't
wish the other member to see who else has had a copy . bcc

I value you input so if you have another idea please let me know , i will take a look at Gasman link .

Regards Ypma
Hi. Did you try my suggestion? Try it out on a couple of members only for testing.
 

ypma

Registered User.
Local time
Today, 20:19
Joined
Apr 13, 2012
Messages
643
Gasman: Thank you for providing me with a link, however unless i am missing something it is not what i am after. i am using late binding to avoid references to Outlook .
Thank again

Regards Ypma
 

ypma

Registered User.
Local time
Today, 20:19
Joined
Apr 13, 2012
Messages
643
theDBguy: Yes i did try your suggestion , but it still did not put any of the addressee in the bbc section of the email , to ensure blind copies . i am assuming i would see any bbc addressees on my sent copy.

Regards Ypma
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:19
Joined
Oct 29, 2018
Messages
21,454
theDBguy: Yes i did try your suggestion , but it still did not put any of the addressee in the bbc section of the email , to ensure blind copies . i am assuming i would see any bbc addressees on my sent copy.

Regards Ypma
Well, try changing the last argument from False to True, so you can see the email first before sending it.
 

ypma

Registered User.
Local time
Today, 20:19
Joined
Apr 13, 2012
Messages
643
theDBguy: You were right all along. I was having one of my many senior moments. i just could not workout why i should put my email address in, hey ho it works fine.

Many thank again
Regards Ypma
 

theDBguy

I’m here to help
Staff member
Local time
Today, 12:19
Joined
Oct 29, 2018
Messages
21,454
theDBguy: You were right all along. I was having one of my many senior moments. i just could not workout why i should put my email address in, hey ho it works fine.

Many thank again
Regards Ypma
Hi. Glad to hear you got it sorted out. Good luck with your project.
 

Users who are viewing this thread

Top Bottom