Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246

    Unanswered: E-mail notification

    Hi,
    I want to be able to send e-mails to various people who are held on a table, once a macro has been run.
    The table will hold e-mail addresses and once the macro has run I want an e-mail sent to each person in that table with a message to say that the data import has been run and the time and date of the import. I don't want to attach a report.

    Is this possible?

    Regards
    John

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    of course, and again of course there are 1000 different ways of doing it.

    my flavour of outlook mailer can be found at http://www.dbforums.com/showthread.p...ight=izymailer
    (you will need a reference set to the outlook library)

    then you have the problem of generating the distribution list. cant help you with macros, but in (DAO) code it goes something like this


    private sub SendTheMail()

    dim dabs as dao.database
    dim recs as dao.recordset
    dim distList as string
    set dabs = currentdb
    set recs = dabs.openrecordset("whateverYourTableIsCalled")
    with recs
    do while not .EOF
    distList = !emailaddress & "; "
    .movenext
    loop
    end with

    'kill trailing semicolon-space
    distList = left$(distList, len(distList) - 2)

    if izymailer (False, distList, "my subject", "my body text") then
    msgbox "sent"
    else
    msgbox "problem"
    endif

    end sub
    Last edited by izyrider; 03-15-04 at 14:56.
    currently using SS 2008R2

Posting Permissions

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