Prev: Command Button to open Form
Next: Just to say hello
From: Rose B on 22 Jan 2010 17:13 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 22 Jan 2010 18:02 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 22 Jan 2010 20:04 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 22 Jan 2010 22:34 "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 23 Jan 2010 04:05
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 > > > > . > |