473,320 Members | 1,991 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,320 software developers and data experts.

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.PersonID =
tblAttendance.PersonID
WHERE (((Contacts.EMAIL)<>"") AND
((tblAttendance.EventID)=[Forms]![FrmEvent2].[EventID]));

Many thanks

Jim Tomdhu

Jan 16 '06 #1
2 2743

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.PersonID =
tblAttendance.PersonID
WHERE (((Contacts.EMAIL)<>"") 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.amazecreations/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.OpenRecordset(strMySql)
Call BulkEmail(rstMailList)
rstMailList.Close
Set rstMailList = Nothing
End Sub
Public Sub BulkEmail(rstMailList As Recordset)
Dim lngMailCount As Long
Dim strWhoList As String
If rstMailList.RecordCount = 0 Then
MsgBox "No email names in selected list", vbInformation, "No
email names found"
Else
' display names found...give chance
rstMailList.MoveLast
rstMailList.MoveFirst
lngMailCount = rstMailList.RecordCount
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(rstMailList(0), "@") > 0 Then
strWhoList = strWhoList & rstMailList(0) & ";"
End If
rstMailList.MoveNext
Loop
If InStr(strWhoList, ";") > 0 Then
strWhoList = Left$(strWhoList, Len(strWhoList) - 1)
End If
DoCmd.SendObject , , , , , 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.OpenRecordset(strMySql)

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

Jim

pi********@hotmail.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.PersonID =
tblAttendance.PersonID
WHERE (((Contacts.EMAIL)<>"") 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.amazecreations/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
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...
5
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...
2
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...
2
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...
5
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...
4
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...
2
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...
4
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...
28
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.