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, , , "(e-mail address removed)", , , "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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top