Send Email Automation Problem

accesser

Registered User.
Local time
Today, 16:04
Joined
Mar 17, 2003
Messages
54
When I try to use automation to send email by MS Outlook using Access 2000, A message appears "A program is trying to access email addresses you have stored in Outlook. Do you want to allow this?. If this unexpected, It may be a virus and you should choose No"

How can I disable this message so it will not appear again
 
Any way of doing this without cost?
 
well I dont normally have much confidence my own ideas but....

we have the same thing at my work with mass emails so the way around it is to do 1 email to all recipients using a loop on the recordset..

actually Mile you helped me with this.. a while back methinks..

although of course redemption does more than this, this should address the thread subject..


Private Sub Command203_Click()
On Error GoTo Err_Command203_Click
Dim emailQuery As QueryDef
Dim dBase As Database
Dim rsEmail As DAO.Recordset
Dim strEmail As String
Dim region As String

region = Me.Combo201.Value

Set dBase = CurrentDb()
Set emailQuery = dBase.QueryDefs("PGR Email list for emailing by region")

emailQuery.sql = "SELECT [PGR main].email, [lea and region].Region, [PGR main].[Subscribed to list] FROM [PGR main] INNER JOIN [lea and region] ON [PGR main].LEANo = [lea and region].LEANo WHERE ((([lea and region].Region)='" & region & "') AND (([PGR main].[Subscribed to list])=True));"

emailQuery.Close

Set rsEmail = CurrentDb.OpenRecordset("PGR Email list for emailing by region")

Do While Not rsEmail.EOF
strEmail = strEmail & rsEmail.Fields("email") & ";"
rsEmail.MoveNext
Loop

strEmail = Left(strEmail, Len(strEmail) - 1)
DoCmd.SendObject , , , strEmail, , , "", "", True

Set rsEmail = Nothing

A Bientot!
 

Users who are viewing this thread

Back
Top Bottom