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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Export Automation

Status
Not open for further replies.

khays

Programmer
Oct 12, 2007
4
US
Does anyone know how to write VBA code to automate exporting a report into an .rtf file with the path/filename automatically?
 
Here is what I use.....strTrustee is a variable naming the report object in Access (rptTrusteeInvoice), and strSavetrusteeInvoices is the actual report name in Windows (Trustee Invoices.rtf). You could use anything else or even "hard" code it.

DoCmd.OutputTo acOutputReport, strTrustee, acFormatRTF, "H:\Billing\CTIL Billing\" & strSaveTrusteeInvoices

Hope this helps.
Programming isn't a profession of choice.
It's a profession of calling...
"Hey Programmer, your application broke again!" [spin]

Robert L. Johnson III, A+, Network+, MCP
robert.l.johnson.iii@citi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top