From: Rose B on
I have a custom ribbon for reports, which can be used in Runtime A2K,
including a button that will export the information in the report to Excel -
all works except that the file created is in Excel 95 (I would like 97 -
2003). Is there any way of doing this?
From: Arvin Meyer [MVP] on
I don't have anything to try this with, but you might try leaving the Format
argument blank in your code. Access should then prompt you. Hopefully,
you'll be able to show it what type of file.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Rose B" <RoseB(a)discussions.microsoft.com> wrote in message
news:41A9B24F-E41E-4105-8E9B-C18EAEC8359B(a)microsoft.com...
>I have a custom ribbon for reports, which can be used in Runtime A2K,
> including a button that will export the information in the report to
> Excel -
> all works except that the file created is in Excel 95 (I would like 97 -
> 2003). Is there any way of doing this?


From: Clifford Bass via AccessMonster.com on
Hi Rose,

The ability to export a report to Excel gets more limited in new
versions of Access. So you might want to contemplate changing what you are
doing as a means of preparation for the future. Maybe use the DoCmd.
TransferSpreadsheet command instead to transfer the data from the report's
query into Excel.

Clifford Bass

Rose B wrote:
>I have a custom ribbon for reports, which can be used in Runtime A2K,
>including a button that will export the information in the report to Excel -
>all works except that the file created is in Excel 95 (I would like 97 -
>2003). Is there any way of doing this?

--
Message posted via http://www.accessmonster.com

From: Albert D. Kallal on

"Rose B" <RoseB(a)discussions.microsoft.com> wrote in message
news:41A9B24F-E41E-4105-8E9B-C18EAEC8359B(a)microsoft.com...
>I have a custom ribbon for reports, which can be used in Runtime A2K,
> including a button that will export the information in the report to
> Excel -
> all works except that the file created is in Excel 95 (I would like 97 -
> 2003). Is there any way of doing this?

If your code is using:

DoCmd.OutputTo acOutputReport, strReport, acFormatXLS, "c:\1.xls"
You could Try

"Excel 97 - Excel 2003 Workbook (*.xls)"
so:

DoCmd.OutputTo acOutputReport, strReport, "Excel 97 - Excel 2003 Workbook
(*.xls)", "c:\1.xls"
The above works in a2010 beta, but see what happnes in 2007. My VPC version
of access 2007 seems to not work for either of the above, so perhaps it will
work for you...


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal(a)msn.com



From: Rose B on
Thanks Albert - that works!

"Albert D. Kallal" wrote:

>
> "Rose B" <RoseB(a)discussions.microsoft.com> wrote in message
> news:41A9B24F-E41E-4105-8E9B-C18EAEC8359B(a)microsoft.com...
> >I have a custom ribbon for reports, which can be used in Runtime A2K,
> > including a button that will export the information in the report to
> > Excel -
> > all works except that the file created is in Excel 95 (I would like 97 -
> > 2003). Is there any way of doing this?
>
> If your code is using:
>
> DoCmd.OutputTo acOutputReport, strReport, acFormatXLS, "c:\1.xls"
> You could Try
>
> "Excel 97 - Excel 2003 Workbook (*.xls)"
> so:
>
> DoCmd.OutputTo acOutputReport, strReport, "Excel 97 - Excel 2003 Workbook
> (*.xls)", "c:\1.xls"
> The above works in a2010 beta, but see what happnes in 2007. My VPC version
> of access 2007 seems to not work for either of the above, so perhaps it will
> work for you...
>
>
> --
> Albert D. Kallal (Access MVP)
> Edmonton, Alberta Canada
> pleaseNOOSpamKallal(a)msn.com
>
>
>
> .
>
 |  Next  |  Last
Pages: 1 2
Prev: Command Button to open Form
Next: Just to say hello