send object

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to set up a command button to send an excel spread sheet from a
report that i have created and is working properly in access 2000. I have
looked at the help file about sending objects via e-mail and have created the
below command line:
***********************************************************
DoCmd.SendObject acReport, stDocName, acFormatXLS, "email@***.com",
"email@####.mil", , sbjdate, "my message", true

************************************************************However when i
try to run the same from in access 2002 i get the following error essage:

" This format in which you are attemptint to output the current object is
not availble."

I do have MS outlook on both systems along with MS Excel. Could Some one
please help
 
Try putting ,"" after true

It should be in the following format.
DoCmd.SendObject acReport, "reportname", "doc.xls)", "who to", "cc", "bcc",
"subject", "message", False, ""
the "" is the template used

Try using a macro to send the spreadsheet. Then save the macro and convert
the macro to code using the Tool, macro, convert macro etc.

Note if you are sending multiple TO emails put a semicolon between the names
e.g. name1;name2 etc.
 
Back
Top