Run-time error 2282 when using DoCmd.SendObject

T

TC

An MS support person answered a similar question some time ago:

"When using SendObject method in Access 2002 to e-mail a report as an Excel
file use one of the constants listed below for the Format argument instead
of the acFormatXLS:
5 for XL97 and earlier
8 for XL2000 or XL2002"

Does that help?

TC


Ginger123 said:
I am getting run time error 2282 when using DoCmd.SendObject in the following:

Dim stDocName As String
stDocName = "rptReport1"
DoCmd.SendObject acReport, stDocName, acFormatXLS,
"(e-mail address removed)", , , "Report 1"
The error message that appears is the following:

The format in which you are attempting to output the current object is not
available. This message does not appear for other formats such as
acFormatRTF, acFormatTXT, acFormatHTML. But, it appears for acFormatXLS.
How can I fix this problem?
 
G

Ginger123

I am getting run time error 2282 when using DoCmd.SendObject in the following:

Dim stDocName As String
stDocName = "rptReport1"
DoCmd.SendObject acReport, stDocName, acFormatXLS, "(e-mail address removed)", , , "Report 1"

The error message that appears is the following:

The format in which you are attempting to output the current object is not available. This message does not appear for other formats such as acFormatRTF, acFormatTXT, acFormatHTML. But, it appears for acFormatXLS. How can I fix this problem?
 

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