By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,137 Members | 1,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,137 IT Pros & Developers. It's quick & easy.

e-mail list

emandel
P: 65
If I would like to send an identical e-mail to all of the contacts in my contacts table (the ones who have e-mail addresses). I would like this to be in the BCC Field and not in the To: field

A. Should I do this from within access? if so how?

B. Should I do this from within Outlook? if so how?
Aug 10 '07 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,392
If you do this in Access you will most likely get a security warning asking you to allow the changes.

You might not get it in Outlook.

As for actually doing it, you want to take a look at the recipients object.
Aug 20 '07 #2

MGrowneyARSI
P: 90
Private Sub Send_Email_Click()
'On Error GoTo Err_Send_Email_Click
Dim rec, a
Dim mysql$, num2proc%
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Dim stDocName As String
Dim strEmail, strBCC 'strSubject, strMessage, strBCC
'strSubject = Forms!send_emails!Subject
'strMessage = Forms!send_emails!Email_Body

Set rec = Nothing
mysql$ = "SELECT * FROM Mail_Merge WHERE (([Do_Action])= " & True & ")"
Set rec = CurrentDb.OpenRecordset(mysql$, dbOpenDynaset)
If Not rec.BOF Then rec.MoveFirst
If rec.EOF And IsNull(rec.email) Then
Set rec = Nothing
MsgBox "No emails to send"
Exit Sub
End If
Do While Not rec.EOF
If Len(strBCC) > 0 Then
strBCC = strBCC & "; " & rec!email
Else
strBCC = rec!email
End If
rec.Edit
rec!Do_Action = False
'rec!Email_ID = Forms!send_emails!Email_ID
rec.Update
If Not rec.EOF Then
rec.MoveNext
Else
Exit Do
End If
Loop
Set rec = Nothing
strEmail = DLookup("[email]", "Users", "[Name] = " & "'" & [Forms]![Login]![AskName] & "'")
If IsNull(strEmail) Then
strEmail = "joseph.growney@accessreadysolution.com"
End If
If Len(Me.Attachment) > 0 Then
stDocName = Me.Attachment
a = Mid(stDocName, 1, 1)
If a = "#" Then stDocName = Mid(stDocName, 2, Len(stDocName) - 2)
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.createitem(0)
With oMail
.to = strEmail
.body = Forms!send_emails!Send_Emailsub!Email_Body
.Subject = Forms!send_emails!Send_Emailsub!Subject
.attachments.Add stDocName
.bcc = strBCC
.display '.Send
End With
Set oMail = Nothing
Set oLook = Nothing
Else
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.createitem(0)
With oMail
.to = strEmail
.body = Forms!send_emails!Send_Emailsub!Email_Body
.Subject = Forms!send_emails!Send_Emailsub!Subject
.bcc = strBCC
.display
'.Send
End With
Set oMail = Nothing
Set oLook = Nothing
End If
Exit_Send_Email_Click:
Exit Sub
Err_Send_Email_Click:
MsgBox Err.Description
Resume Exit_Send_Email_Click

End Sub



This is what I use It builds the Bcc based off of a subform in datasheet view and selects the users with bolean fields set to true then gets the body and subject from another form and sends the email here is the original code aswell the code above is slightly moded



'Use this to send Email from outlook with attachments

Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object

Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.createitem(0)
With oMail
.to = "someone@email.com"
.body = "Attached is a PDF file for your viewing"
.Subject = "Job Item"
.Attachments.Add ("C:\Documents and
Settings\ron_m\Desktop\rptJobItemStat.pdf")

'***** ".Display" is the command to preview instead of send *********
.Send

End With

Set oMail = Nothing
Set oLook = Nothing
End Function
Aug 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.