Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    2

    Question Unanswered: Emailing a report? Please help

    Hi

    I have a report which includes a customers email address as a record.

    I want to on clicking a certain button have this report emailed to the email address on the report plus another person.....

    I have tried sendoutput to??? but can't get the email address picked up....

    Also when I did get an email (though customer email not there) I used rich text and lost all of my pictures, lines????

    Any help with these would be greatly appreciated
    Thanks

  2. #2
    Join Date
    Apr 2003
    Location
    Alabama, USA
    Posts
    154
    To send attachment as a snapshot file.

    DoCmd.SendObject acReport, stDocName, "SnapshotFormat (*.snp)", Me.txtEmailAdd, , , strSubject, strMsg

    where
    stDocName = Report Name
    Me.txtEmailAdd = Email Address
    strSubject = Subject
    strMsg = Email Message

    Sample database
    Last edited by Cosmos75; 08-25-04 at 02:09.
    http://AccessDB.Info

    You live and learn. At any rate, you live. - Douglas Adams

  3. #3
    Join Date
    Sep 2003
    Posts
    228
    What if I want to use a command line utility like blat to send the email. How would I create a snapshot file to attatch to the email?

  4. #4
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    Quote Originally Posted by ottomatic
    What if I want to use a command line utility like blat to send the email. How would I create a snapshot file to attatch to the email?
    you would create a temp snapshot file on the harddrive with outputto action and attach it I guess?
    Last edited by ghozy; 09-30-04 at 14:27. Reason: clarification
    ghozy.

  5. #5
    Join Date
    Sep 2003
    Posts
    83
    Try the following,

    Dim stDocName As String

    stDocName = "test Report"
    DoCmd.SendObject acSendReport, stDocName, acFormatRTF,'to name','cc name', , "title of report on subjectline of email."

    refer the sendobject Method for more details:
    DoCmd.SendObject [objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]


    You can write the above code on the click event of the command button.
    Last edited by skodidhi; 09-30-04 at 14:28.

Posting Permissions

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