|
 |
access thread: Publishing reports
Message #1 by "Peter Duke" <peteydukie@y...> on Fri, 17 Aug 2001 01:09:06
|
|
I will be publishing a series of reports into word but I don't know how to
automate the naming of the reports. For example, when I open the report
with
DoCmd.OpenReport acpreviewnormal, "rptMemo"
and then hit the 'publish into word' button, it automatically saves it
as "rptMemo.rtf". I want to be able to insert the value of a textbox as
the name of the report so that it saves it as "textboxvalue.rtf" (I need
it automated because the values would be very easy to key in wrong if done
manually)
Any sugestions?
Thanks
Message #2 by "Pardee, Roy E" <roy.e.pardee@l...> on Fri, 17 Aug 2001 07:24:23 -0700
|
|
OutputTo will work--e.g.,
strFileName = "c:\MyFolder\MyReport.doc"
DoCmd.OutputTo acOutputReport, "rptMyReport", acFormatRTF, strFileName
I don't know what this does if the filename already exists--you'll want to
play with that & see.
Cheers,
-Roy
-----Original Message-----
From: Peter Duke [mailto:peteydukie@y...]
Sent: Thursday, August 16, 2001 6:09 PM
To: Access
Subject: [access] Publishing reports
I will be publishing a series of reports into word but I don't know how to
automate the naming of the reports. For example, when I open the report
with
DoCmd.OpenReport acpreviewnormal, "rptMemo"
and then hit the 'publish into word' button, it automatically saves it
as "rptMemo.rtf". I want to be able to insert the value of a textbox as
the name of the report so that it saves it as "textboxvalue.rtf" (I need
it automated because the values would be very easy to key in wrong if done
manually)
Any sugestions?
Thanks
Message #3 by "david adams" <davidadams00@h...> on Fri, 17 Aug 2001 14:44:45
|
|
why not just use a combobox or listbox and set the value of your reportname
string (sreportname) to the selected value of the listbox/combobox? if
there is possiblity for typing the name wrong, just give them a valid list
of choices.
dav
>
>I will be publishing a series of reports into word but I don't know how to
>automate the naming of the reports. For example, when I open the report
>with
>
>DoCmd.OpenReport acpreviewnormal, "rptMemo"
>
>and then hit the 'publish into word' button, it automatically saves it
>as "rptMemo.rtf". I want to be able to insert the value of a textbox as
>the name of the report so that it saves it as "textboxvalue.rtf" (I need
>it automated because the values would be very easy to key in wrong if done
>manually)
>
>Any sugestions?
>Thanks
|
|
 |