Can I automate this in a macro?

Big Pat

Registered User.
Local time
Today, 19:40
Joined
Sep 29, 2004
Messages
555
Hi,

I have a report called rptCurrentInps>20days. Each day I "print" this report, using cutePDFwriter (another great tip from someone on this site) and then I save it in a particular location, always overwriting the previous days version.

The path to the pdf file is W:\Delayed Transfers Of Care\Current Inpatients over 20 days.pdf.

I need to hand this over to another user now, so I want to create a macro that will do all this when a button on a form is clicked, but I'm not sure what to put in the macro.

If I use the OpenReport action, with the Print argument, the report is PHYSICALLY printed from my default printer (and I don't want to make cutePDFwriter the default)

If I use the OpenReport action, with the Print Preview argument, the report displays on screen and I can select the printer, but then I haven't automated it properly and I need it to be a one-click process (or close to it) for the end users who are PC-phobic.

I've also looked at the OutputTo action and selected .rtf format, but this loses quite a bit of formatting, so it not really suitable.

I suspect I need some bespoke code for this, but at this point I'm in over my head. Can anyone help?

Thank you.


PS. Using Access 2003
 
how about trying the snapshot format instead of the rtf

DoCmd.OutputTo acOutputReport, "rptName", "Snapshot Format", "Path", True

Also rather than a macro you can place the above code on the onClick event of a command button
 
No I'm afraid that wont work, as not all users can open the snapshot format (something to do with the way IT have installed Office2003 I think)

I think I've come across code somewhere that allows you to specify the printer you need e.g.

SetPrinter=cutePDFwriter
Set Path = W:\Delayed Transfers Of Care\Current Inpatients over 20 days.pdf
Save
Overwrite = True

....only written in proper code of course!
 

Users who are viewing this thread

Back
Top Bottom