1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Sending reports in Access through email.

Discussion in 'Web & Email' started by Talismanic, Aug 2, 2000.

Thread Status:
Not open for further replies.
  1. Talismanic

    Talismanic Thread Starter

    Joined:
    May 25, 2000
    Messages:
    409
    I have a report from a table that stores sensitive information. I know that an report can be emailed with this:

    Private Sub Command10_Click()
    On Error GoTo Err_Command10_Click

    Dim stDocName As String

    stDocName = "tblPanic"
    DoCmd.SendObject acReport, stDocName

    Exit_Command10_Click:
    Exit Sub

    Err_Command10_Click:
    MsgBox Err.Description
    Resume Exit_Command10_Click

    End Sub

    When that command button is pushed a Select Format box comes up first and then (after selection) it opens up Outlook with the report as an attachment. Is it possible to set the default Select Format to Rich Text Format and skip that dialog? And also the recipiant will allways be the same person, is it possible to fill in the recipient mailbox name and the subject automaticaly?

    ------------------
    Building the Ultimate site list for PC support.
     
  2. Talismanic

    Talismanic Thread Starter

    Joined:
    May 25, 2000
    Messages:
    409
    Never mind, I figured it out. It took me a while because I thought there was a send mail macro available in Access. It wasn't listed on the macro list but the Command Button Wizard will set it up for you. That is the code I put in the first post. Not satisfied with the results I was getting I went on a search for a better way, and that is when I ran across the SendObject command. It works great!

    DoCmd.SendObject acReport, "tblPanic", "RichTextFormat(*.rtf)", "[email protected]", "", "", "Estimate Tracking", "", False, ""

    ------------------
    Building the Ultimate site list for PC support.

    [This message has been edited by Talismanic (edited 08-02-2000).]
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/39119

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice