Email not working

rick roberts

Registered User.
Local time
Today, 19:43
Joined
Jan 22, 2003
Messages
160
can anyone tell me whats wrong with this code. im on access 2007 with sp3

Code:
Private Sub cmdEmail_Click()
    Dim stDocName As String
    stDocName = "rptCalculatorFax"
    DoCmd.SendObject acReport, stDocName, acFormatTXT, "rick@rrroberts.freeserve.co.uk", , , "Weekly Figures", , False
    Exit Sub
End Sub

it's meant to send the report rptCalculatorFax to my email address but i get a runtime error 2587 - cant complete the output operation
 
noticed two things here Rick...and I'm not sure if they are relevant or not.

1) You are on SP3 for office? I think there is a bug in that service pack whereby Access becomes corrupted with certain functions. But don't quote me on that...

2) You have the "edit message" argument in the syntax line set to FALSE. This means that the message is supposed to be sent automatically, and I'm not even sure if this option opens your email client at all, but it's possible that it doesn't (don't know, never tried it). I'm also wondering if the problem is not with your email client?? Or maybe it is with the Text type format that you are trying to output? Are there any graphs in the report?

Just guessing here for you...
 
Might want to check your version of Access again. 2007 has no sp3 - it has sp1. Are you on Windows XP SP3 perhaps?
 
this error seems to have righted itself in the end although i tried various options for the code -- im still using what i had originally and it seems to have righted itself -- so ill never know whether it was access or outlook that was to blame
 

Users who are viewing this thread

Back
Top Bottom