473,785 Members | 2,419 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email list into BCC field

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 run a macro which runs a select
query which strips out and exports a list of their e-mail addresses (
separated by commas) into a text file. I then copy the CSV e-mail
addresses and paste them into the BCC field of Outlook.

I'd love to have a means of achieving this in one step. Is there a way?

If it's of interest , my select query is as follows:-

SELECT [email] & "," AS EMAILADDRESS
FROM Contacts LEFT JOIN tblAttendance ON Contacts.Person ID =
tblAttendance.P ersonID
WHERE (((Contacts.EMA IL)<>"") AND
((tblAttendance .EventID)=[Forms]![FrmEvent2].[EventID]));

Many thanks

Jim Tomdhu

Jan 16 '06 #1
2 2766

Tomdhu wrote:
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 run a macro which runs a select
query which strips out and exports a list of their e-mail addresses (
separated by commas) into a text file. I then copy the CSV e-mail
addresses and paste them into the BCC field of Outlook.

I'd love to have a means of achieving this in one step. Is there a way?

If it's of interest , my select query is as follows:-

SELECT [email] & "," AS EMAILADDRESS
FROM Contacts LEFT JOIN tblAttendance ON Contacts.Person ID =
tblAttendance.P ersonID
WHERE (((Contacts.EMA IL)<>"") AND
((tblAttendance .EventID)=[Forms]![FrmEvent2].[EventID]));

Many thanks

Jim Tomdhu


You can automate Outlook (search here or there's code at Danny
Lesandrini's website
www.amazecreati ons/datafast) and then you can open the query inside a
recordset and then loop through it, adding to the BCC list of the
message.

Jan 16 '06 #2
Hi,

Thanks, but I ought to have mentioned that I'm a relative Newbie and
not too good at doing VB.
I scanned the site you mentioned but couln't find anything suitable
however I did find an earlier post from Albert Kallai in 2002 as
follows:-
Private Sub cdmEmail_Click( )
Dim rstMailList As Recordset
Dim strMySql As String
strMySql = "select emailname from qryGroupList where (emailname is
not null) " _
& " and (Mailto = True) order by emailname"
Set rstMailList = CurrentDb.OpenR ecordset(strMyS ql)
Call BulkEmail(rstMa ilList)
rstMailList.Clo se
Set rstMailList = Nothing
End Sub
Public Sub BulkEmail(rstMa ilList As Recordset)
Dim lngMailCount As Long
Dim strWhoList As String
If rstMailList.Rec ordCount = 0 Then
MsgBox "No email names in selected list", vbInformation, "No
email names found"
Else
' display names found...give chance
rstMailList.Mov eLast
rstMailList.Mov eFirst
lngMailCount = rstMailList.Rec ordCount
If MsgBox("There are " & lngMailCount & " email names in this
list" & vbCrLf _
& "Do you want to make a email for this list?",
vbQuestion + vbYesNo) = vbYes Then
' build the list
strWhoList = ""
Do While rstMailList.EOF = False
If InStr(rstMailLi st(0), "@") > 0 Then
strWhoList = strWhoList & rstMailList(0) & ";"
End If
rstMailList.Mov eNext
Loop
If InStr(strWhoLis t, ";") > 0 Then
strWhoList = Left$(strWhoLis t, Len(strWhoList) - 1)
End If
DoCmd.SendObjec t , , , , , strWhoList, "Greetings from My
Company"
End If
End If
End Sub

I modified the field names to suit but it baulks at this line:-

Set rstMailList = CurrentDb.OpenR ecordset(strMyS ql)

Bearig in mind I run Access2000, is there any reason it would stutter
at this stage?

Jim

pi********@hotm ail.com wrote:
Tomdhu wrote:
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 run a macro which runs a select
query which strips out and exports a list of their e-mail addresses (
separated by commas) into a text file. I then copy the CSV e-mail
addresses and paste them into the BCC field of Outlook.

I'd love to have a means of achieving this in one step. Is there a way?

If it's of interest , my select query is as follows:-

SELECT [email] & "," AS EMAILADDRESS
FROM Contacts LEFT JOIN tblAttendance ON Contacts.Person ID =
tblAttendance.P ersonID
WHERE (((Contacts.EMA IL)<>"") AND
((tblAttendance .EventID)=[Forms]![FrmEvent2].[EventID]));

Many thanks

Jim Tomdhu


You can automate Outlook (search here or there's code at Danny
Lesandrini's website
www.amazecreati ons/datafast) and then you can open the query inside a
recordset and then loop through it, adding to the BCC list of the
message.


Jan 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2459
by: Hanjo Grüßner | last post by:
Hello, I'm not shure wether it's OT or not. I want to use an eMail as a trigger to start a program. E.g. an eMail-Group: any group-member sends an eMail to a group-e-adress an the Mail is dispatches automatically to all members. I know there are services like yahougroups who do exactly this, but I
5
14498
by: Paul Cheevers | last post by:
Hi, This is driving me nuts to say the least!!!!! I am trying to send an email from some server side ASP code and the CC field is giving me some problems. The code works fine if I have one or 2 email addresses in the field (The addresses are valid.) However if I have 4 it breaks. Now the good part......If I copy the 4 addresses (that were causing the problem) into the
2
1739
by: J. Marshall Latham | last post by:
I would like to know if anyone knows the limit of email addresses that can be put into this field or the limit on the number of characters that can be put into this field. Are there any other limitations that I need to consider? I am trying to set up a newsletter with a subscribe and unsubscribe page. I need to know if I need to monitor the number of email addresses in the list to make sure that all people on the list receive the...
2
3816
by: Nigi | last post by:
I've made a mysql database with php front end which, in part, contains mailing lists. I've used a mailto: link to create a new email with their names in the bcc: field. Unfortunatley their is a limit on the size of a mailto: field that outlook can accept, and so it can't be used to mail more than about 80 people at a time. Our lists go up to 200. Can anyone suggest a workaround that will enable people to follow a link to a new email...
5
2248
by: Mark | last post by:
Hi All, Is there a way to (whilst using the sendobject command) use a query as the source of email addresses. I ask this because the list is constanly changing and I don't want to keep going into the code to change the list? I am very new to programming and though that I could declare the SQL statement but that has not worked. Could anyone offer any direction to find the best way to do this if indeed it can be? The code I am trying to...
4
2228
by: ianbarton | last post by:
Hello all I am trying to setup a feedback form on my webpage using some script provided by my ISP. I really don't know a lot about PHP and it's syntax etc. The feedback form only has 4 fields. These are UserName, UserEmail, UserCountry & Comments. It works well with all of those fields appearing in the body of an email that is sent to me. What I would now like is for the UserEmail field to appear in the "From:" field in the
2
5566
by: tk | last post by:
Hello, At the moment im building a database for a driving school, I have a customer field, with email address as an attribute. I dont know much about macros in access but once the customer has booked a lesson i want a automated email to be sent to the customer 3 days or a few days before their driving lesson, stating the driving instructor, booking ID time and date etc. I have 5 tables apart from customer: Employee, Car, Booking, Package...
4
2011
by: chris | last post by:
I need to maintain a list of subscribers to an email list for a "newsletter" that will be sent via a web form probably once a month. I anticipate low numbers--tens to maybe one hundred subscribers at the most. Just curious what the best way to code this is. Should I just loop through the addresses and send one-off emails to each, or is it better to somehow send to every recipient in one shot? One thing I would like to avoid in the...
28
4436
tdw
by: tdw | last post by:
Hi all, I am trying to add a feature to our database that automates sending emails. When entering a new order, I want the option to send an email to the company the order came from, attaching a copy of our work order. The file that I want to attach is a rich text document created by Access and stored on our server. The creation of this document is not the problem. The problem is getting the email option to work. It does not seem to...
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10148
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10091
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.