Results 1 to 2 of 2
  1. #1
    AceRimmer is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2013
    Posts
    1

    Access 2010 - VBA code - Add report to body of email

    Access 2010 - add report to body of an email


    good morning



    i have VBA code to create an email and attach an excel file,



    what i would like is code to add a report called REPORTMISSINGDATES to the body of the email,





    this is the code i have so far, which works and adds everythng i wqant except the main body of the email



    Private Sub Command31_Click()
    On Error GoTo Command31_Click_Err


    Dim Email As String
    Dim name As Variant
    Dim EMPloy As Variant
    Dim month As Variant

    month = MonthName([Forms]![STAFFATTENDANCEMenu]![StaffMonth])
    EMPloy = Forms!staffattendancezone!Staff
    name = DLookup("[STAFFNAME]", "[QRYSTAFFNAME]", "[ASA] = Forms!staffattendancezone!Staff")



    Email = (Forms!STAFFATTENDANCEAdjust!Email)
    DoCmd.SendObject acQuery, "STAFFATTENDANCEZONECheckEmployee", "ExcelWorkbook(*.xlsx)", [email], "", "", "" & "Attendance Errors", "THIS IS WHERE I WANT THE REPORT TO GO" _


    End Sub

    any help in this wouldf be great

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    A good start would be to see the link here.
    http://www.access-freak.com/blog2008...ryAugust200802

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

Similar Threads

  1. Email report as body of email (RTF)
    By TheDeceived in forum Programming
    Replies: 4
    Last Post: 07-23-2012, 06:39 AM
  2. Email report as body of email
    By chrish20202 in forum Programming
    Replies: 6
    Last Post: 01-15-2012, 07:23 PM
  3. FORMATTING Outlook Email in BODY of Access code
    By taimysho0 in forum Programming
    Replies: 7
    Last Post: 11-28-2011, 11:04 AM
  4. Replies: 1
    Last Post: 05-23-2011, 08:07 AM
  5. Email from report to Email body
    By Ehmke66 in forum Programming
    Replies: 4
    Last Post: 01-03-2011, 01:06 PM

Tags for this Thread

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