PDA

View Full Version : Solved: Sending Report via E-Mail



Kicker
01-11-2005, 09:02 AM
Is there a way of automatically sending a report via e-mail? I have generated a few reports in Access and need to get them to other people in the company. Currently, I am saving them to rtf files with the Word link and then sending the rtf file via email. I would like to do it all from Access automatically.

We use Lotus Notes for E-Mail.

ttfn
Kicker

SJ McAbney
01-12-2005, 06:15 AM
I believe you can make a snapshot of the report and send that within an email.

Daniel Klann
01-13-2005, 04:57 PM
Hi,

You can use the SendObject method to do this. This example should give you the idea:


DoCmd.SendObject ObjectType:=acSendReport, _
ObjectName:="MyReport", _
OutputFormat:="Rich Text Format", _
To:="someone@somewhere.com", _
Subject:="Subject goes here", _
MessageText:="And you can put body text here", _
EditMessage:=False 'This determines whether the message will be displayed or just sent


HTH
Dan

Kicker
01-13-2005, 06:01 PM
Daniel:

That works great....It took me all of 45 seconds to drop that code into my test application and see it work. Now, if it works at work with Lotus Notes as well as it does at home with MS Outlook, I am in great shape.

ttfn
Kicker

bkudulis
06-02-2005, 03:00 PM
When you do this the report loses all of it's lines and check boxes. Is there a way to retain the same formatting that is in Access?

xCav8r
06-02-2005, 03:46 PM
I hope not, because I've wasted hours of work formatting my reports in vba in Word. ;)

bkudulis
06-02-2005, 03:49 PM
I do not want to format the report in word I would like to keep the same formatting that is in Access. Any lines that are created in Access do not come over when you sendobject.

xCav8r
06-02-2005, 04:15 PM
I never wanted to do it either. Had to. As an alternative, you might try printing the report to distiller or something equivalent.

GaryB
06-02-2005, 04:38 PM
Hi everyone,

One thing we have been doing a lot of is printing our reports out as an PDF file, It keeps all of the formating exactly like the report, and then emailing it as an attachment.

GaryB