Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Kenton, Delaware, USA
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send Form (Access 2000)

    I have a form showing personnel information. One of the fields is an Email address. What I want to do is send the form as an attachment to each person on the list, showing just that persons information, using the Email field as the address. Since there are over 600 of these I need to be able to automate this task. Any suggestions?

  2. #2
    New Lounger
    Join Date
    Oct 2002
    Location
    Tennessee, USA
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Send Form (Access 2000)

    Hi Bill,

    What I do is open an object then loop through the rs with email addresses, and send that object:

    '************************************************* ******************
    '* Function e_Mail created by J Moss for xxxxxx on 06062000 *
    '************************************************* ******************
    '* The purpose of this function is to read tbleMailAddr *
    '* and send the current NonConformance Form to all email addresses *
    '* entered in the table. *
    '************************************************* ******************

    Public Function e_Mail()


    Dim objSession As Object
    'start with the top of the mapi hierarchy
    ' --- the session model
    Set objSession = CreateObject("mapi.session")
    'use the local Outlook default profile
    objSession.logon profilename:="Microsoft Outlook"
    Dim strTo As String
    Dim db As Database
    Dim rs As Recordset
    Set db = CurrentDb()
    Set rs = db.OpenRecordset("tbleMailAddr")


    rs.MoveLast
    rs.MoveFirst

    Do While Not rs.EOF


    strTo = rs!eMailAddr

    DoCmd.SendObject acSendReport, , acFormatRTF, strTo, , , _
    "Non Conformance Report", , False
    rs.MoveNext
    Loop
    objSession.logoff
    Set objSession = Nothing

    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •