Results 1 to 3 of 3

Thread: Sendobject

  1. #1
    Join Date
    Feb 2004
    Posts
    214

    Exclamation Unanswered: Sendobject

    I need help using this. I am not very good with VBA. I have a table labeled Main with the field Email Address containing the email addresses. I have an email template in Word named Email_Template.doc. I am needing to code something so that when I press a command button, that it sends the text in the Word document in the body of the email to all of the recipients in my table. Can anyone help me with this?

  2. #2
    Join Date
    Feb 2004
    Posts
    214

    Exclamation ...

    Private Sub Command0_Click()
    Dim strEmail As String
    Set rsEmail = CurrentDb.OpenRecordset("AGI_180")

    Do While Not rsEmail.EOF
    strEmail = rsEmail.Fields("E-mail Address").Value
    DoCmd.SendObject , , , strEmail, , , "Subject", "Message Text"

    Loop
    Set rsEmail = Nothing
    End Sub



    I have the above code so far, but here are my problems. I need it to pull it's message text from a word document and in that word document it has a <<greeting line>> that pulls from the same table above "AGI_180" the persons first and last name.

    Another problem I am runnining into is that there are multiple records in the table and it is only pulling the first record. I need it to send it to all email addresses as seperate emails.

  3. #3
    Join Date
    Feb 2004
    Posts
    214

    ...

    can no one help me?????

Posting Permissions

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