-
Solved: Sending Report via E-Mail
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
-
I believe you can make a snapshot of the report and send that within an email.
-
Hi,
You can use the SendObject method to do this. This example should give you the idea:
[VBA]
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
[/VBA]
HTH
Dan
-
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
-
Send Object
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?
-
I hope not, because I've wasted hours of work formatting my reports in vba in Word.
-
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.
-
I never wanted to do it either. Had to. As an alternative, you might try printing the report to distiller or something equivalent.
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules