Automatically sending outlook emails with Sendobeject

Phonik

Registered User.
Local time
Today, 23:19
Joined
Sep 22, 2006
Messages
111
Good day to you fine people.

Could anyone help me at all please? It's a little early here and the old brain is a little slow today.
I am using the sendobject function to send a report I have created in my database. I am using the following syntax:

DoCmd.SendObject acSendReport, "PMRReport", acFormatSNP, TeamLeader, , , "RMS ****PMR Handler Report****", "The RMS system has sent you Referral Reports for ready for their PMR which has been set to "

The obstacle I have is that this code works fine but this process is something that I want running as a background task so that the user does not know its going on. This code generates everything I need, Email address, attachment, message body text etc...but...wait for it....it does not send the email. The outlook pane still requires user intervention to "click the send button" :-(
Can anyone throw any light on this at all? I am here most of the day so will gladly try and return the favour. Thank you kindly. :-)
Gareth
 
Hi Phonik,

Have you tried adding
,Send
To the end of your docmd.?
 
Hi

Thanks for you reply.
I have just tried this but it said "Wrong number of arguments". I tried playing around with it but no luck.. :-(

Gareth
 
Hi again
I have just tried this and it work OK for me, apart from a warning message

DoCmd.SendObject acSendReport, "Report", acFormatSNP, "email@address", , , "RMS ****PMR Handler Report****", "The RMS system has sent you Referral Reports for ready for their PMR which has been set to ", send
 
Great!! I had too many commas after the email body text!
Thank you so much for your help....

Best wishes

Gareth
 

Users who are viewing this thread

Back
Top Bottom