Send Object

chuckster

Registered User.
Local time
Today, 12:10
Joined
Oct 4, 2000
Messages
52
I have a simple loop on a form that cycles through each record and sends an email to email address on each record and there particluar file.

The loop works fine accept I have to hit send each time the email opens. For the loop to continue onto the next one.

I've tried SendKeys ("%s"), true but It doesn't work. (I probably have the synatx wrong.)

Is there a way to make it send the object without waiting for the user to hit the send button?
 
I have two answers for you. If you are sending the same email, why not build a string for your send line instead of sending individual emails. It would look something like

dim strTo as string

strTo=""
do until (however you are cycling, rst probably)
strTo=strTo & ";" & rst!EmailAddress
loop

Then use your strTo as the To argument in the sendobject command.

OR

Your problem might be that you need to set the edit message argument to false.
 
Try setting the editmessage parameter to "False". Ex.:

DoCmd.SendObject ,,,"ToJohn@doe.com",,,"Subject","Message",False

Hope this helps,

Peter De Baets
Peter's Software - MS Access tools for developers http://www.peterssoftware.com
 

Users who are viewing this thread

Back
Top Bottom