How to save export file type preferences?

  • Thread starter Thread starter PackerFan
  • Start date Start date
P

PackerFan

Guest
I just upgraded to Access 2003. When exporting multiple queries, the Save As Type field keeps defaulting back to Microsoft Office Access. I have to change it to Microsoft Excel 97-2003 every time. Does anyone know how to change my default preference for the file type? I always want to export to Excel! Your help is much appreciated. :cool:
 
Here is a code:
Function Excellexprt()
On Error GoTo Excellexprt_Err

DoCmd.OutputTo acQuery, "Yourquery1", "MicrosoftExcelBiff8(*.xls)", "", False, "", 0
DoCmd.OutputTo acQuery, "Yourquery2", "MicrosoftExcelBiff8(*.xls)", "", False, "", 0
DoCmd.OutputTo acQuery, "Yourquery3", "MicrosoftExcelBiff8(*.xls)", "", False, "", 0


Excellexprt_Exit:
Exit Function

Excellexprt_Err:
MsgBox Error$
Resume Excellexprt_Exit

End Function
 
Thanks!

aleb:
Thank you, this is great! One more question: the code sample exports the file as Excel 5-7, but ideally I would like to export as Excel 97-2003. Any suggestions on how to make that happen? Thanks again. :cool:
 
What version of MS office do you have installed on your machine ? I tried to run the code and it did what I needed.
 
I have Office 2003 installed and I can not get it to work either. Leaving that parameter blank will give you a popup that lets you choose your output format type [which I kinda like] but I could not get it to specify the newer version of Excel.

Code:
DoCmd.OutputTo acQuery, "YourQueryName", "", "", False, "", 0
I tried differrent versions of this but no luck, since it still would only give the option of the Excel 5-7 (*.xls) format using this...

Code:
DoCmd.OutputTo acQuery, "YourQueryName", "Microsoft Excel 97-2003 (*.xls)", "", False, "", 0
 
Office Version

I have Office 2003, and my results are identical to ghudson's. Any ideas?
 

Users who are viewing this thread

Back
Top Bottom