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

Output Access Report to RTF File

Status
Not open for further replies.

slickpg

Programmer
Sep 8, 2003
7
US
Using following cmd in code to output an Access 97 report to an RTF file that can be opened in Word 97 and then print the rtf document:

DoCmd.OutputTo acOutputReport, strRpt, acFormatRTF, "C:\AccessReports\"

but receive following error msg:

"The formats that enable you to output data as a Microsoft Excel, rich-text format, MS-DOS text, or HTML file are missing from the Windows Registry."

Does anybody have any suggestions as to why the above cmd would not work ??? Have seen Microsoft KBA 226526 but was of no help
 
Hi..

You may have to reinstall MS Office to straighten out the registery problems, you are also missing some syntax in your command

DoCmd.OutputTo acOutputReport, "Temp", acFormatRTF, "C:\Temp\Temp.rtf", True

"Temp" is a report in my database

"C:\Temp\Temp.rtf" is the COMPLETE path and filename of the destination file

True tells the app to automatically open the appropriate program
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top