Email causing Crash

Rainbowhawk

Registered User.
Local time
Today, 13:19
Joined
Oct 8, 2007
Messages
54
Hi all

I am trying to send reports via email using VB code

Code:
DoCmd.SendObject acReport, "MOEmailOrderList", "RichTextFormat(*.rtf)", Eaddress, "", "", subj, msg, False, ""

However its is intermittently crashing, will work 5 times then fall over for no apparent reason the next 4 times.

Running Access 97 (yes I know but they wont let us upgrade) in Windows XP with Office 2003

Any thoughts?

Tim
 
wrap it in this sort of thing. at least it will fail gracefully


Code:
on error goto fail
docmd.sendobject ...

exit sub


fail:
 call msgbox("unable to send email. Please try again" & vbcrlf & vbcrlf & _
   "Error: " & err & "   Desc: " & err.description)
 
Hi

Yep I do have an error trap running however this is causing a complete crash and force close.

Seems to be ok only Access and Outlook are open so using that as a temp fix

Thanks

Tim
 

Users who are viewing this thread

Back
Top Bottom