Sending same e-mails to different destinations

A

Amateur

Dear Sirs, I do know how to send a report to a specified e-mail with a Macro
activated by a command button.

Here my question:
I would like to send a Newsletter to e-mail addresses which are stored in a
table.
The newsletter is as well stored in a table - I would like to:
A) send the Newsletter as a text in the e-mail and not as an attachement
B) that no destination e-mail address is shown (or only one-by-one and not
all) in the e-mail "TO" field
Is this possible?

Thanks for any help.
Klaus
 
P

pietlinden

Dear Sirs, I do know how to send a report to a specified  e-mail with aMacro
activated by a command button.

Here my question:
I would like to send a Newsletter to e-mail addresses which are stored ina
table.
The newsletter is as well stored in a table - I would like to:
A) send the Newsletter as a text in the e-mail and not as an attachement
B) that no destination e-mail address is shown (or only one-by-one and not
all) in the e-mail "TO" field
Is this possible?

Thanks for any help.
Klaus

open the query that returns all the recipients, loop through it, send
to recipient in the e-mail. I think Arvin has an example on his
website.
http://www.datastrat.com/Code/MultipleEmail.txt
 
A

Amateur

Sorry I've tried this script - changed the names in and only question marks
are coming out of my head.

Can you tell me on a step-to-step basis what I have to do?
 
D

Danny Lesandrini

How about this? (Change table and field names to match your database)

--
Danny J Lesandrini
(e-mail address removed)
www.amazecreations.com


Public Function mailfoo()
On Error Resume Next

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
Dim strSubject As String
Dim strBody As String
Dim strText As String
Dim strName As String
Dim strEmail As String
Dim fEditMsg As Boolean

Set dbs = CurrentDb
strSQL = "SELECT FirstName, LastName, Email FROM Contacts"
Set rst = dbs.OpenRecordset(strSQL, dbOpenSnapshot)

strSubject = "This is the subject"
strBody = "Here is the body text you want to send in the email."
fEditMsg = True

Do Until rst.EOF
strName = rst!FirstName & " " & rst!LastName
strText = "Dear " & strName & ":" & vbCrLf & vbCrLf & strBody
strEmail = rst!Email

DoCmd.SendObject , , , strEmail, , , strSubject, strText, fEditMsg

rst.MoveNext
Loop

Set rst = Nothing
Set dbs = Nothing

End Function
 
H

hor vannara

Amateur said:
Dear Sirs, I do know how to send a report to a specified e-mail with a
Macro
activated by a command button.

Here my question:
I would like to send a Newsletter to e-mail addresses which are stored in
a
table.
The newsletter is as well stored in a table - I would like to:
A) send the Newsletter as a text in the e-mail and not as an attachement
B) that no destination e-mail address is shown (or only one-by-one and not
all) in the e-mail "TO" field
Is this possible?

Thanks for any help.
Klaus
 
H

hor vannara

Amateur said:
Dear Sirs, I do know how to send a report to a specified e-mail with a
Macro
activated by a command button.

Here my question:
I would like to send a Newsletter to e-mail addresses which are stored in
a
table.
The newsletter is as well stored in a table - I would like to:
A) send the Newsletter as a text in the e-mail and not as an attachement
B) that no destination e-mail address is shown (or only one-by-one and not
all) in the e-mail "TO" field
Is this possible?

Thanks for any help.
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top