Results 1 to 2 of 2
  1. #1
    Join Date
    May 2002

    Question Unanswered: sendobject and for..each

    hi everyone,

    my problem is i can't find the way to send automatically emails to many employees at the same time.

    What i'm trying to is :

    I got an employees table (named employee), where each employee has a service number.

    after importing data (account numbers, and Service Number) in "MyTable", i want to notify by mail employees who got their service number in the imported data..

    to summarize, it might be similar to :
    For each "Service number" in MyTable
    mail to employees where Employees.service number IN MyTable...

    Hope this is understandable, and please ignore my english mistakes, i'm french..

    Thanks for your kind help.


  2. #2
    Join Date
    Feb 2002
    Here's something to get you started, I use Outlook:

    Set myOlApp = CreateObject("Outlook.Application")
    Set myItem = myOlApp.CreateItem(olMailItem)
    Set myRecipient = myItem.Recipients.Add("insert email address here")
    Set myRecipient = myItem.Recipients.Add("insert copy email address here")
    myRecipient.Type = olCC

    Set myAttachments = myItem.Attachments
    myAttachments.Add "insert file name here"

    myItem.Subject = "Subject"
    myItem.Body = "Message"

    Good luck!

Posting Permissions

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