Results 1 to 4 of 4

Thread: Access email send

  1. #1

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Access email send

    I have a client that I have just helped move a list of 450 email addresses into a database.

    They now need to send emails to these people to let them know what is going on.

    What would be the best way for me to do this.

    If code is involved snippits would be great.

    The database has one table with one field in it.
    ?
    'What's this bit for anyway?
    For Jono

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    You mean you don't want to do it manually??
    You could select all the addresses into a recordset, then loop through them.
    In the loop, use DoCmd.SendObject to send them all an email, inserting their address in the relevant spot, using acSendNoObject for the object.
    VB Code:
    1. For i = 0 to rs.RecordCount - 1
    2.    strEmail = rs!i
    3.    DoCmd.SendObject acSendNoObject, , , strEmail, , , "Big News Subject", "My Message", True
    4. Next
    Look up SendObject in help if you want to know all the arguments.

  3. #3

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774
    Originally posted by salvelinus
    You mean you don't want to do it manually??
    You could select all the addresses into a recordset, then loop through them.
    In the loop, use DoCmd.SendObject to send them all an email, inserting their address in the relevant spot, using acSendNoObject for the object.
    That is a brillient start. Thankyou. Is there any way to use a template email?

    I'm gonna look up SendObject in the mean time.
    ?
    'What's this bit for anyway?
    For Jono

  4. #4
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    What do you mean by a template email? Same subject & body?
    Just put it in a string or constant variable and include that where the subject & body go.
    If they have to be somewhat personalized, like a mail merge, build them in the loop.

Posting Permissions

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



Click Here to Expand Forum to Full Width