Sending Email to Distribution List 
Author Message
 Sending Email to Distribution List

Is there a way to send a Access object(report, table etc) to a email
distribution list? I want to use Access to mail to a group of addresses
created after a query runs

Ted Woodward




Mon, 27 Aug 2001 03:00:00 GMT  
 Sending Email to Distribution List
With outlook, it works best:

The sendobjject method of the docmd object works fine.  You can use a group
assigned in outlook or pull the email addresses from a table in your
database.  tbls, qrys work great, reports suck, you have to send it in *.rtf
format and you lose a lot of formatting.  If your users could install some
freeware from microsoft, loook into the snapshot viewer option.  It works
well

This is a routine I use just to give you the jist, it makes a table and
sends it as xls to a list of emails in a table in the db
************************CODE************************************************
Sub EmailAEBudgets()
Dim rs          As Recordset
Dim fEmail      As Field
Dim fLoc        As Field
Dim fID         As Field
Dim sSQL        As String
Dim qdf         As QueryDef
Dim dte         As Date
Dim i           As Integer

i = MsgBox("Do you want to send the AE Bugets?", vbYesNo + vbDefaultButton2,
"Send AE Budgets")
If i = vbNo Then Exit Sub

Set rs = CurrentDb.OpenRecordset("tblLocation")
Set fEmail = rs("LSM")
Set fLoc = rs("Location")
Set fID = rs("CorpID")
Set qdf = CurrentDb.CreateQueryDef("")

  Do Until rs.EOF
    sSQL = "SELECT tblLocation.Location, tblAEBudgets.FirstName,
tblAEBudgets.LastName, CCur(tblAEBudgets.Budget) as Budget, "
    sSQL = sSQL & "tblAEBudgets.CorpID, GetLeague([tblAEBudgets]![Budget])
AS League INTO AEGrps "
    sSQL = sSQL & "FROM tblLocation INNER JOIN tblAEBudgets ON
tblLocation.CorpID = tblAEBudgets.CorpID "
    sSQL = sSQL & "WHERE tblAEBudgets.CorpID =" & fID & ";"
      qdf.SQL = sSQL
        qdf.Execute
          dte = Format(Now(), "General Date")
            DoCmd.SendObject acSendTable, "AEGrps", acFormatXLS, fEmail,

True

  rs.MoveNext
  DoCmd.DeleteObject acTable, "AEGrps"
  Loop

  MsgBox "Done"
End Sub
************************************************************

Quote:

>Is there a way to send a Access object(report, table etc) to a email
>distribution list? I want to use Access to mail to a group of addresses
>created after a query runs

>Ted Woodward





Mon, 27 Aug 2001 03:00:00 GMT  
 Sending Email to Distribution List
Yes, You can use a macro and the SendObject action.
Good Luck,

Quote:
>Is there a way to send a Access object(report, table etc)
to a email
>distribution list? I want to use Access to mail to a group
of addresses
>created after a query runs

>Ted Woodward





Fri, 31 Aug 2001 03:00:00 GMT  
 Sending Email to Distribution List

Quote:

>Is there a way to send a Access object(report, table etc) to a email
>distribution list? I want to use Access to mail to a group of addresses
>created after a query runs

See my Access Email FAQ at my website below.

Tony
----
Message posted to newsgroup and, if appropriate, emailed.
Tony Toews, Independent Computer Consultant
Microsoft Access Links, Hints, Tips & Accounting Systems at
   http://www.granite.ab.ca/accsmstr.htm
VolStar http://www.volstar.com Manage hundreds or
   thousands of volunteers for special events.



Sun, 09 Sep 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. sending email to distribution list with MAPI command

2. Error in macro email wb to distribution list in PAB

3. Create distribution list from email

4. Public Folders message post automaticallly emails a distribution list

5. add/edit Email distribution list

6. add/edit Email distribution list

7. add/edit Email distribution list

8. Having vb program create new distribution list in Outlook to send mail to

9. WHEN EMAILING A PERSONAL DISTRIBUTION CONTAING OTHER EMBEDDED PERSONAL DISTRIBUTION LISTS, THE EMBEDDED LISTS ARE UNAVAILABLE.

10. automatic send email to owner in list

11. sending email to a list in an excel sheet

12. Send email to a mailing list

 

 
Powered by phpBB® Forum Software