Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    2

    Unanswered: email a report with the report in the body and NOT as an attachment.

    I'm a newbee to VB and I'm having a bit a problem. I'm trying to email a report via outlook with the report in the body and not in an attachment.

    So far from what I can tell I need to open the report (called "Call Details" in this case), convert it to HTML, put that into a string and then put the string into the email body.

    Can anyone tell me how to do this?

    Thanks in advance.
    - Andy

  2. #2
    Join Date
    Jul 2009
    Posts
    2
    bump

    Does anyone have any ideas?

    This is what I've got so far but it doen't work.

    Public Sub CommandMailReport_Click()
    Dim StrBody, StrNumber

    ' EXPORT THE CALLS DETAILS REPORT TO AN HTML FILE
    DoCmd.OutputTo acOutputReport, "Call Details", acFormatHTML, "c:\temp\CallDetails.html"

    'IMPORT THE HTML INTO A STRING
    'StrBody = GetText("c:\temp\CallDetals.html")

    MsgBox StrBody


    'PUT THE STRING INTO THE BODY OF AN EMAIL

    'test strbody

    MsgBox StrBody


    End Sub

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Not I. I've never tried it.

    It would be quite helpful if you explained WHY it "doesn't work". Error messages... God I grow tired of saying this.... are there error messages produced, does it run and not give the results you want if so why not,....

    "it doesn't work" is such a vague remark.

    My TV doesn't work. Can you tell me what is wrong with it?? Any Ideas? I tried the power button on the remote, but it didn't work. Please help.

    You have to help us before we can help you.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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