By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,567 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,567 IT Pros & Developers. It's quick & easy.

Exporting report to RTF

P: n/a
I am trying to export a report straight to RTF. At the moment when I click
on export an output to box appears asking which format (HTML, Excel, MS DOS,
RTF, Snapshot). I want to skip this and save to RTF automatically. I have
searched and can't find a solution. My code looks like this:

Dim stDocName As String

stDocName = "rptCosts"
DoCmd.OutputTo acReport, stDocName

Thanks
Will
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Will" <Wi************@hotmail.com> wrote in message
Dim stDocName As String

stDocName = "rptCosts"
DoCmd.OutputTo acReport, stDocName

Thanks
Will

Hi Wil try this

Dim stDocName As String
DoCmd.OutputTo acReport, stDocName, "RichTextFormat(*.rtf)", "yourname.rtf",
True

True means that the file will automatically be opened on creation (change to
false if you do not like this).

- Nicolaas
Nov 13 '05 #2

P: n/a
Modified From the help file

DoCmd.OutputTo acOutputReport, stDocName _
acFormatRTF, "C:\My Documents\Employee.rtf", True

Place your cursor on the key word (i.e. OutputTo) and press F1 to open the
help file on the appropriate help on that topic.

Jeff
"Will" <Wi************@hotmail.com> wrote in message
news:31*************@individual.net...
I am trying to export a report straight to RTF. At the moment when I click on export an output to box appears asking which format (HTML, Excel, MS DOS, RTF, Snapshot). I want to skip this and save to RTF automatically. I have searched and can't find a solution. My code looks like this:

Dim stDocName As String

stDocName = "rptCosts"
DoCmd.OutputTo acReport, stDocName

Thanks
Will

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.