Log in

View Full Version : OutputTo command with Excel 2007



eed
12-28-2007, 12:23 PM
Hi, all!

I am working on converting an Access application from 2003 to 2007. In Access 2003, I used the following command to export an Access report to Excel 2003:
DoCmd.OutputTo acReport, "rptAllParameters_Excel", "MicrosoftExcelBiff8(*.xls)", , True, "", 0

Of course this no longer works with 2007, because the reference to Excel is no longer correct. I thought I could build a macro and convert it to VBA to get the right syntax, only to discover that the macro builder in Access 2007 does not offer (as 2003 did) the option to output a report to Excel.

Because the report includes sub-reports, the Excel output of the report in 2003 greatly differed in appearance from the Excel output of an associated table or query (e.g., sub-data was "indented" into interior columns).

Does anyone know how I could replicate in Access 2007 the effect of the 2003 VBA command displayed above?

Thanks a million in advance...
eed