DoCmd.OutputTo acOutputQuery acFormatXLS to 97-2003 not 2005

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
 
J

Jeff C

--
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
 
P

pdxSteve

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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top