Re: SendObject - acFormatXLS error


Tom Geimer

I have an Access 2000 application that exports a report to
Excel and attaches it to an outlook email prior to sending
it to a distribution list using the command:

Docmd.SendObject acSendReport, "rptTodayReceivingLog",

We started testing this feature against Access 2002
(Office XP SP2) and it fails with the following error
message: "Runtime error 2282, The format in which you are
attempting to output the current object is not valid" even
thought the module compiles without errors.

Removing the acFormatXLS from the command line does allow
the code to execute without error, but does trigger the
pop-up window, forcing the user to select the output
format each time.

the acFormatXLS option is used in various other places in
the application (Docmd.OutputTo acOutputQuery....) without

Online help for the SendObject method shows that
acFormatXLS is a legitimate OutputFormat. Any idea why
this fails in Office XP?




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