Connecting Tech Pros Worldwide Forums | Help | Site Map

Exporting report to RTF

Will
Guest
 
Posts: n/a
#1: Nov 13 '05
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



WindAndWaves
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Exporting report to RTF



"Will" <Will_567962772@hotmail.com> wrote in message
[color=blue]
> Dim stDocName As String
>
> stDocName = "rptCosts"
> DoCmd.OutputTo acReport, stDocName
>
> Thanks
> Will[/color]
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


Jeff Smith
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Exporting report to RTF


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" <Will_567962772@hotmail.com> wrote in message
news:31iseaF3apoecU1@individual.net...[color=blue]
> I am trying to export a report straight to RTF. At the moment when I[/color]
click[color=blue]
> on export an output to box appears asking which format (HTML, Excel, MS[/color]
DOS,[color=blue]
> RTF, Snapshot). I want to skip this and save to RTF automatically. I[/color]
have[color=blue]
> searched and can't find a solution. My code looks like this:
>
> Dim stDocName As String
>
> stDocName = "rptCosts"
> DoCmd.OutputTo acReport, stDocName
>
> Thanks
> Will
>
>[/color]


Closed Thread