Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Unanswered: Help with calling a form into an email

    I am trying to use the following code in order to send out the same email to different people that are in a table in Access, and this enters there email addresses in the bcc column, which is working great. The problem is I want to use an outlook template as the body of the email and I'm not sure how to do that. I'm not sure if this is possible? Is it possible to use any kind of template to be the body of the email? If any one can help me I would appreciate it.

    CODE:

    Function MultiList()
    On Error GoTo Err_List



    Dim List1 As String
    Dim MaxPerList, CountThisList As Integer
    Set dbs = CurrentDb

    Set rs = dbs.OpenRecordset("Emails")
    MaxPerList = 99


    With rs
    If .RecordCount <> 0 Then
    Do While Not rs.EOF
    List1 = ""
    CountThisList = 0
    Do While Not rs.EOF And CountThisList < MaxPerList
    List1 = List1 + rs(6) + "; "
    .MoveNext
    CountThisList = CountThisList + 1
    Loop


    List1 = Left(List1, Len(List1) - 2)


    DoCmd.SendObject , , , "test@test.com", , List1, "This is a test", , True


    Loop
    End If
    End With

    Exit_List:
    Exit Function

    Err_List:
    MsgBox Err.Number
    MsgBox Err.Description
    Resume Exit_List

    End Function
    Sub Send()

    End Sub

  2. #2
    Join Date
    Mar 2004
    Posts
    128

    Sending e-mail

    Hi,
    You can easily use the " Send Object" action int Macro.
    There you can choose your sendees,and the file that you want to attach to the email.
    If you want Vb code,You and do one of the following:
    1. Use the convert macro to VB,after you build the macro.
    2. Use the command Docmd.SendObject (....)
    See the help of the SendObject command and it's parameters
    I hope it will help ue
    Bye

  3. #3
    Join Date
    Mar 2004
    Posts
    128

    Arrow Calling form into E-mail

    Hi,
    You can easily use the " Send Object" action int Macro.
    There you can choose your sendees,and the file that you want to attach to the email.
    If you want Vb code,You and do one of the following:
    1. Use the convert macro to VB,after you build the macro.
    2. Use the command Docmd.SendObject (....)
    See the help of the SendObject command and it's parameters
    I hope it will help ue

  4. #4
    Join Date
    Nov 2004
    Posts
    3
    Thanks for the help, but I don't want to send an attachment I want the templete to be the body of the email, not as an attachment. So in the code that I have given you above, it opens a blank email in outlook and fills in the email addresses in the bcc: row. What I want to do is have the code open the the email template in Outlook and fill in the bcc: row with the email addresses like it does know. I'm new to VB so I don't know if this can be done?

Posting Permissions

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