Output To Excel defaults to version 5-7/want Excel 10

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

TIA:

In my code:
DoCmd.OutputTo acOutputQuery, "qryCNdataall", acFormatXLS, "c:\" & name &
".xls", False

The file is Excel 5-7 format.

How might I get the file saved as Excel 10?

Thanks,
Joel
 
Joel said:
TIA:

In my code:
DoCmd.OutputTo acOutputQuery, "qryCNdataall", acFormatXLS, "c:\" & name &
".xls", False

The file is Excel 5-7 format.

How might I get the file saved as Excel 10?

Use TransferSpreadsheet instead of OutputTo. TransferSpreadsheet allows you to
specify the Excel version.
 
Thanks but I believe I can only export tables and I am exported data from a
query...any other way other than having to create tables from query?

Joel
 
Joel said:
Thanks but I believe I can only export tables and I am exported data from a
query...any other way other than having to create tables from query?

The third argument for TransferSpreadsheet (TableName) is poorly named. You can
use it for exporting saved select queries as well.
 
Thanks for the insight...Joel

Rick Brandt said:
The third argument for TransferSpreadsheet (TableName) is poorly named. You can
use it for exporting saved select queries as well.
 
Back
Top