Export from Access 2007 to Excel 2007

Hemish

Registered User.
Local time
Today, 19:02
Joined
Jan 20, 2005
Messages
65
Hi i have just upgraded from Access 2000 to Acces 2007. I am using my vba script to export data but for some reason it does not like Access query exporting into excel.

Below is my code


DoCmd.OutputTo acOutputQuery, "qryCustomerSalesAndStockOfferExport", acFormatXLS, "c:\StockOfferLog\CustomerStockSalesAndOffer.xls", False

Can anyone please help me as i am stuck

Thank toy for your help
 
DoCmd.OutputTo acQuery, "qryCustomerSalesAndStockOfferExport", "MicrosoftExcel(*.xls)", "c:\StockOfferLog\CustomerStockSalesAndOffer.x ls", False, ""

Try that. Thats what I use
 
Hemish,

Have you installed the Office 2007 SP2 update?
 
Hi

I installed the Service pack 2 this morning and it still was not working. I tried the code from above and it works fine, its was fairly simple.

Thank you very much for your help
 

Users who are viewing this thread

Back
Top Bottom