DoCmd.OutputTo acOutputQuery acFormatXLS to 97-2003 not 2005

  • Thread starter Thread starter pdxSteve
  • Start date Start date
P

pdxSteve

I am using access2007, vista on a new computer..

I am trying to automate creating dozens of excel worksheets from the results
of a parameter query.

When i export the query to excel using the DoCmd.OutputTo acOutputQuery
acFormatXLS command, a worksheet is created in the Excel 5.0/95 workbook
format.... (is that 1995?)

Is there a way to associate the acFormatXLS (*.xls) constant to the Excel
97- Excel 2003 workbook format? (or is the another constant that is mapped to
this format).

thanks

sk
 
--
Jeff C
Live Well .. Be Happy In All You Do


pdxSteve said:
I am using access2007, vista on a new computer..

I am trying to automate creating dozens of excel worksheets from the results
of a parameter query.

When i export the query to excel using the DoCmd.OutputTo acOutputQuery
acFormatXLS command, a worksheet is created in the Excel 5.0/95 workbook
format.... (is that 1995?)

Is there a way to associate the acFormatXLS (*.xls) constant to the Excel
97- Excel 2003 workbook format? (or is the another constant that is mapped to
this format).

Try using transferspreadsheet:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, ............etc
etc
 
Jeff,

thanks... i changed my code to read:

DoCmd.OutputTo acOutputQuery, stDocName,
acSpreadsheetTypeExcel9, strOutput

but it fired this error: Error 2282: the format in which you ar attempting
to output the current object is not available ... ???

I have office2007 installed..
 
Back
Top