Report PASTED into E-Mail body as RTF  Version

Posted on 2007-10-19
Last Modified: 2013-11-28
Greetings, I have a report that I would like to paste (as an RTF format) into the body of an e-mail (NOT as an attachment, but into the body). I am not sure how I can copy the report to the clipoard, and then paste into the body all in one motion, but I am hoping someone here can!!

The best thoughts I have, would be to save the report as RTF, then open the file, read the results and copy/paste it into the body of the e-mail, but I am way out of my league to do this.

I dont have any pictures, but I am using a pretty complex report with tables built in and sub-reports being used.

Creating the RTF file works perfectly, I just need to be able to copy the same file into an e-mail body...


I have this:

With objMail
     .To = "Report Distro"
     .Subject = "REPORT" & Format(Date, "dd-mmm-yyyy")
End With
Question by:NickJPhillips
    1 Comment
    LVL 1

    Accepted Solution

    to save the report as a txt:

    docmd.OutputTo acOutputreport, "ReportName", acFORMATtxt, "C:\Example\Report.txt"

    then has this to say about reading a file. [Use LoadTextFile("C:\Example\Report.txt") after body =]  :

    (add this function into your form)

    Public Function LoadTextFile(sFile As String) As String
        Dim iFile As Integer
         ' \\ Use FreeFile to supply a file number that is not already in use
        iFile = FreeFile
         ' \\ ' Open file for input.
        Open sFile For Input As #iFile
         ' \\ Return (Read) the whole content of the file to the function
        LoadTextFile = Input$(LOF(iFile), iFile)
        Close #iFile
    End Function

    I've tried it and it works for me

    hope this helps,


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now