Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Report Print to File

Status
Not open for further replies.

123FakeSt

IS-IT--Management
Aug 4, 2003
182
It is possible to open an Access Report in Preview mode, choose Print and then select Print to File.

I need to automate this in a VBA module and the process of naming the .prn file, but can't find it in Docmd.OpenReport, Docmd.PrintOut, or Docmd.RunCommand acCmdPrint.

I hope there is a better way than creating a printer that prints to the :FILE port with the new name each time.

Any ideas?

I am attempting this because i have a multi-application set of reports to automate and want them to print out in order. By naming the .prn files customly I can then loop through them and send them to the printer in order after all of the files have been created.

The early bird gets the worm, but the second mouse gets the cheese.
 
I believe the command you're looking for is DoCmd.OutputTo; you can specify a rich text file, for example, with the acFormatRtf flag.
 
That won't work because it is not post-script (or post PCL technically). I have things to print here that are not OLE so i can't do the printing (i.e. creating the post-script files) from within a single application.

For instance i can have powerpoint, excel, lotus notes, adobe, UNIX create .prn files named 20050331-001.prn for instance that are print-ready. When all of the applications have made their specific contributions i can call a simple VB script that pushes these to the printer in order.

The early bird gets the worm, but the second mouse gets the cheese.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top