Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"DoCmd.OutputTo" creates file with wrong excel-version 2

Status
Not open for further replies.

robertsquestion

Technical User
Jul 16, 2003
81
GB
Hi,

I'm using Office 2003 and have an Access database in which I use the following code:
DoCmd.OutputTo acOutputQuery, "Q_export_all", acFormatXLS

This works fine, except for the fact that I have to save the exported excel-file as an "Microsoft Excel 5/7 (*.xls)"-file by default. In the "save as type" box I cannot select the normal "Microsoft Office Excel Workbook (*.xls)", so that I get a normal Excel 2003 file. Now I get an excel 95 file.

Can anyone help me out here?
Thanks in advance for your help!

Regards,
Robert
The Netherlands
 
robertsquestion,
Look at [tt]DoCmd.TransferSpreadsheet()[/tt], it gives you control over the format of the output workbook.

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
Check this out and see if this helps.
thread181-27567
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top