473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

e-mail list

emandel
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
2 1531
Rabbit
12,516 Expert Mod 8TB
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
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

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

Similar topics

7
by: Spammay Blockay | last post by:
Does anybody know of a solid Java-based email list management product? - Tim --
1
by: Mike Harris | last post by:
I would like to provide links to email addresses from my website via ASP.net. Our email addresses are stored in Exchange 2000 so I would have to query my AD database. Does anyone have any code...
2
by: toedipper | last post by:
Hello, php and mysql I am looking to start a newsletter on my site. I imagine I will have a text box that users enter their email address into and a button that says 'subscribe' To stop...
2
by: Tomdhu | last post by:
I've got a Contacts & Events database in Access 2K where contacts attend various events. At present, where I want to group e-mail all the attendees who are going to attend a particular event, I...
0
by: slinky | last post by:
Thanks in advance for for any clues: I have a website I'm building using MS-Visual Web Developer Express (Asp.Net/VB.net). I'm tooling it to collect names and emails to send out our newsletter. I...
1
by: Paul Brady | last post by:
This must be a common operation, but I have searched this newsgroup and have wrestled with the help messages, and I seem to need help with this simple task. I have an Access 2000 database which,...
1
by: =?Utf-8?B?RHVhbmU=?= | last post by:
I have a large (100+) list of email addresses in an excel spread sheet and would like to convert them to a mailing list for use in Windows Mail. Can this be done?
2
by: bkendra5 | last post by:
I work for an auction company and we want to make an emailing list. currently we have all the emails coming in through our email, then we just print them and send out each individual email. Our...
2
by: CDMAPoster | last post by:
I wrote a very simple demo program in A97 for concatenating email lists. The undo and redo buttons only undo or redo a set of single clicks, not a group operation. I might add a function to save...
4
by: vinod allapu | last post by:
hi all, I have a string str which contains email addresses seperated with ';' like...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.