I am trying to email a report based on the click of a button on a form. I've done this several times using SendObject in an Access 2000 database with Outlook 2000, but each time I try from an Access 97 database (not converted, and open in Access 97), I get the following error:
Labels97 can't open the mail session Check your mail application to make sure it is working properly
Here is the code I'm using:
Private Sub butCloseForm_Click()
On Error GoTo Err_butCloseForm_Click
If CheckSendEmail Then ' Send Email Notification of New Label to Shawn
DoCmd.OpenReport "rptFindUncreatedLabels", acViewPreview
DoCmd.SendObject acSendReport, "rptFindUncreatedLabels", acFormatRTF, _
"Shawn_Berkstresser@satec.com", , , "New Label Created"
DoCmd.Close acReport, "rptFindUncreatedLabels"
' Do nothing if not checked
Anyone know of any references that might have to be defined to do this?