Exporting query to excel format

D

Dave R.

Using Office 2003, I am using this code to email a query, in excel format:

DoCmd.SendObject acSendQuery, "1yr Follow-up-CHW", acFormatXLS, _
strToWhom, , , "CAASA Query ", _
, 1


When I do this and send to myself, save the XL file, and go through
"file>get external data>excel files" and try to open the file, I get the
message "Import Spreadsheet Wizard - The wizard is unable to access
information in the file ... query1.xls. Please check that the file exists
and is in the correct format."

I looked up this message and see a KB article but it says the problem didn't
apply to Access '03 or Excel '03 which I have. Also when I open the XL file
(again with XL 2003) I get the message "File error. Some number formats may
have been lost."

Is there another way to create an excel file and attach to an email that
would work?

Thanks.
 

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