Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendObject does not work more than Once in a loop

Status
Not open for further replies.

MikeRussell

Programmer
Apr 22, 2001
16
AU
I am using the following code in a loop. It worked fine with MSAccess2000, WinNT and Outlook98, but now doesn't work with MSAccess2000, Win2000 and Outlook2000.

DoCmd.SendObject , , , Tempemail, , , "Confirmation of Bank Account Transfer", emailtxt, False, False

Tempemail is a variable that holds the email address
emailtext is a variable that holds the email content

Only the first email gets sent, the code continues to loop with no errors or warnings but does not send any more emails. Also if I run the code again, with the same session of Access open no emails get sent. If I reload Access I will get one email sent.

So the conclusion is that only one email gets sent per session of Access.

Has anyone got any advice?

 
Hi

You make no mention of any (error) messages, but I suspect this is being caused by new secrity settings in Outlook which impact the sending of multiple EMails.

I am not aware of a solution Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
the problem lies probably with your security settings in outlook 2K. You might try to look these up (en check te help in oulook and on the web) to find an appropriate answer.

I once had a similar problem and had to hack th registry to be able to send multiple e-mails (in outlook 2002)

Hope this helps you out.

Vincent
 
It happened to me with the same configuration.
I don't know why it happens, but it does.
If the mail addresses are separated by comma, replace it by semicolon and try again. It worked for me...
If no result, I'm also beaten.
[pipe]
Daniel Vlas
Systems Consultant
danvlas@yahoo.com
 
I had the exact same problem after migrating from A97 to A2000.

This relates to a known issue with SendObject under A2000, documented at
Microsoft do provide a rather simplistic workaround (rather than a fix) in their Knowledge Base but there's a more feature-rich alternative at that I can't recommend highly enough (mainly because I wrote it! [smile])

Hope this helps. [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top