send email

A

anna_717717

Hi All,

I'm using the following code to try to send an email (which i will modify at
some time to send a report) :

DoCmd.SendObject acSendNoObject, , , "[email protected]", , , "Testing", "this
is a test email", False

Set olApp = New Outlook.Application
Set olNS = olApp.GetNamespace("MAPI")
Set olSyncs = olNS.SyncObjects
Set olSync = olSyncs.Item(1)
olSync.Start


I believe the second part of it is meant to force outllook to do a send
/recieve.
My problem is that when somebody clicks a button to send the email, with
outlook closed, it does not send automatically, but is in the outbox when i
next open outlook. Can I force the email to be sent imediately without
opening outlook?

Thanks
 
Top