Results 1 to 2 of 2
  1. #1
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115

    sending a list of open po to each vendor via email in the body

    hi

    I have a database in which is a table with all the collected data
    Vendor
    order
    date of delivery
    email adress of the vednor

    I want to send a report as a body mail to each vendor`s email address in the table with the open orders of that given vendor.
    Is that possible at all?

    thanks a lot for any ideas

  2. #2
    webisti is offline The Wisher
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    115
    for the moment I am using this code to send the report to a given user
    but I want the code to search for every email in the table and send to each of them the report with their open po`s.
    Code:
    Private Sub cmdEmailList_Click()
    Const ForReading = 1, ForWriting = 2, ForAppending = 3
    Dim db As DAO.Database
    Dim fs, f
    Dim RTFBody, strTo
    Dim objOutlookRecip As Outlook.RECIPIENT
    Dim MyOutlook As Outlook.Application
    Dim MyItem As Outlook.MailItem
    
    'DoCmd.OutputTo acOutputReport, "Report1", acFormatRTF, "Report1.rtf"
    DoCmd.OutputTo acOutputReport, "VENDOR", acFormatHTML, "C:\Users\me\vendor.htm"
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.OpenTextFile("C:\Users\ME\vendor.htm", ForReading)
    'Set f = fs.OpenTextFile("Report1.rtf", ForReading)
    RTFBody = f.ReadAll
    f.Close
    Set MyOutlook = CreateObject("Outlook.Application")
    Set MyItem = MyOutlook.CreateItem(olMailItem)
     With MyItem
       .To = "ME@ME.COM"
       .Subject = "Dispute Update"
       .HTMLBody = RTFBody
    End With
    MyItem.Display
    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. sending data into an email body - outlook
    By webisti in forum Access
    Replies: 6
    Last Post: 02-15-2012, 07:05 AM
  2. Email report as body of email
    By chrish20202 in forum Programming
    Replies: 6
    Last Post: 01-15-2012, 07:23 PM
  3. Replies: 1
    Last Post: 05-23-2011, 08:07 AM
  4. Email from report to Email body
    By Ehmke66 in forum Programming
    Replies: 4
    Last Post: 01-03-2011, 01:06 PM
  5. Email Report for each Vendor
    By dennisg in forum Reports
    Replies: 0
    Last Post: 09-29-2008, 02:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums