Intermittent problem with sendobject

michaelfischer

New member
Local time
Today, 04:05
Joined
Jun 16, 2001
Messages
6
Using access97, I use the code below to send emails with an attachment which has worked now for several weeks.

DoCmd.SendObject acReport, stDocName, acFormatRTF, stTo, , , stTitle, "Please e-mail acknowledgement of this order. Thank you."

Now, i am intermittently getting error "Could not open one or more attachments". Sometimes, if i re-run the code several times it works!.

Appreciate any help with this problem.
Many thanks.
 
Some ideas:

Is it possible that the report is empty under certain circumstances?

Is it possible that Sendobject is trying to send the report while some of the data is still being written by another process? (putting DoEvents immediately before the SendObject line might help in this case)
 

Users who are viewing this thread

Back
Top Bottom