Email report through LAN

Paul Cooke

Registered User.
Local time
Today, 11:48
Joined
Oct 12, 2001
Messages
288
I hope someone can help me with this one?

A collegue has completed a form (Treatment Form)When completed they currently click a button that prints & saves the current page of the report and then returns to the switchboard. What I need it to do is to email the current page of the report to my postbox (Paul Coooke)on our LAN.

Please bear in mind my Access knowledge is basic (which is more than my knowlegde of VB)!!

Thanks for any help
 
Use File Send to Mail Recipient and depending on what your report contains I would suggest as RTF (Rich Text Format).

See no VB in sight!!


HTH

Paul
 
Look into the SendObject, the syntax will look similar to this:

DoCmd.SendObject acReport, "ReportName", "RichTextFormat(*.rtf)", _
"EmailAddress", , , "OptionalSubject", "OptionalText", True

To make it easy you can start a new macro and choose SendObject. This will give you a list of all the arguments that you can use with it. Post back if you have more questions or you would like instructions on how to convert a macro into VBA code.

[This message has been edited by BukHix (edited 10-14-2001).]
 
Thanks Guys!

Niether of these seem to wokr for me when I use the Macro Version it starts of by printing all the pages in the report and then comes up with a "halt message" but gives no reason why it's halted.

The 2nd option by BukHix gives an error message "The formats that enable you to output data as a MS Excel, RTF, or MS-Dos, or HTML file are missing from the windows registry"

Which doesn't sound good to me!!!
 
Note that the SendObject and OutputTo methods lose most of the formatting of the report. Columns are thrown out of line and any borders etc. are all lost. Even when you do it manually through File->SaveAs/Export and save as rtf loses the formatting, only less.

There is an tool called Snapshop Viewer, but using the SendObject or OutputTo methods, there is no intrinsic constant to output to Snapshot Viewer. You can however do a manual save as .snp and then attach it to the mail in the code, but I guess this is not so sophisticated.
 
Note that the SendObject and OutputTo methods lose most of the formatting of the report. Columns are thrown out of line and any borders etc. are all lost. Even when you do it manually through File->SaveAs/Export and save as rtf loses the formatting, only less.

There is an tool called Snapshop Viewer, but using the SendObject or OutputTo methods, there is no intrinsic constant to output to Snapshot Viewer. You can however do a manual save as .snp and then attach it to the mail in the code, but I guess this is not so sophisticated.
 
Actually you can us SNP as the constant with Access2000. I'm not sure what version you have but I found this in A2K and it doesn't appear to be documented. Instead of

DoCmd.SendObject acReport, "ReportName", "RichTextFormat(*.rtf)", _
"EmailAddress", , , "OptionalSubject", "OptionalText", True

Use
DoCmd.SendObject acReport, "ReportName", "Snapshot(*.snp)", _
"EmailAddress", , , "OptionalSubject", "OptionalText", True

This works like a charm for me.
 

Users who are viewing this thread

Back
Top Bottom