acFormatXLS Works in 2003 not 2007

K

Kelly

I have a db system with an option to send a report as an Excel spreadsheet
attachment to an email; been working like a champ for the last few years. Our
office staff upgraded to MS Office 2007 and now an error message comes up at
that line and the command fails. Interestingly, just for fun I changed the
format variable from acFormatXLS to acFormatRTF and it worked just fine. Any
clues? Help is much appreciated.

The code:
DoCmd.SendObject acSendReport, stDocName, acFormatXLS, strEmail, , ,
strSubjectLine, strMessage, True

The error message:
The format in which you are attempting to output the current object is not
available.
 
K

Kelly

Well, I found my own answer in the MSDN boards. For whatever reason it is by
design, MS has taken out the ability to export a report in Excel format. I
exported the query instead and hope the client is happy without the report
headings and such.
 

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

Similar Threads


Top