[AccessD] Email Automation Error

Boyd, Mark Thomas (US - Philadelphia) mboyd at deloitte.com
Tue Sep 18 10:57:07 CDT 2007


I'm using code to loop thru a # of email addresses and send an email to
each addr.
My code pretty much does the following:
 
Set rst = CurrentDb.OpenRecordset("SELECT [EmailAddr] FROM
tblEmailAddrs")
rst.MoveFirst
Do Until rst.EOF = True
  ... populate Subject, To, Body, and add attachment
  objOutlookMsg.Display
  SendKeys "^{ENTER}", True 'automatically send form
  rst.MoveNext
Loop
 
The code works perfectly on my computer, however not so much on another
pc.  The 1st email sends fine, but the 2nd one produces the following
error when the code hits "objOutlookMsg.Display":  "A dialog box is
open. Close it and try again."
 
Has anyone experienced this error before?  From the screenshot this
person sent to me, there doesn't appear to be any dialog boxes blocking
the email message from displaying.
Any help/direction is greatly appreciated.
 
Thanks,
Mark Boyd 


This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law.  If you are not the intended recipient, you should delete this message. 


Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1]



More information about the AccessD mailing list