Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010

    Unanswered: send email from access to outlook

    hey guys,
    having issues here. i have a macro to send an email to an address that is selected, and it works fine, but I want it to send an email only to the addresses that are being displayed, as i may have a filter on, and want more than one address in the TO field. This is what I have.
    =[Contact Name] & IIf(Nz([E-mail Address])<>""," [" & [E-mail Address] & "]")

    Any idea on how to edit this to include multiple addresses?

    also, is it possible to add images to the body? how would i go about that?


  2. #2
    Join Date
    Mar 2007
    Here's my difinitive email site: Microsoft Access Email FAQ
    RuralGuy (RG for short) aka Allan Bunch MS Access MVP - acXP, ac07, ac10 - WinXP Pro, Win7 Pro
    Please reply to this forum so all may learn.

  3. #3
    Join Date
    Sep 2010

    getting closer, but still stuck

    I'm getting closer, but am still stuck:

    how do i get the body of the email to include HTML tags?

    here is what I have so far. I want to have a banner embedded on my mail message:

    Dim cat As New ADOX.Catalog
    Dim cn As DAO.Connection
    Dim rs As DAO.Recordset

    Dim strEmail As String

    Set db = CurrentDb
    Set rs = db.OpenRecordset("Contacts")

    With rs
    Do While Not .EOF
    strEmail = strEmail & .Fields("E-mail Address") & ";"
    End With

    strEmail = Left(strEmail, Len(strEmail) - 1)

    Set cmd = Nothing
    On Error GoTo Err_Command281_Click

    DoCmd.SendObject _
    , _
    , _
    , _
    "", _
    , _
    ("" & strEmail), _
    "Testing - Subject", _
    "<b>Test Message Here</b>", _

    Exit Sub

    MsgBox Err.Description

    Resume Exit_Command281_Click
    End Sub

Posting Permissions

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