View Full Version : Email not working


rick roberts
10-15-2008, 02:39 AM
can anyone tell me whats wrong with this code. im on access 2007 with sp3

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

ajetrumpet
10-19-2008, 02:24 PM
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...

boblarson
10-19-2008, 06:21 PM
Might want to check your version of Access again. 2007 has no sp3 - it has sp1. Are you on Windows XP SP3 perhaps?

rick roberts
11-25-2008, 05:19 AM
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