>Here is how to force it out, depending on your setting it might not go right away
>
oOutlook = GETOBJECT(,"Outlook.Application")
> oNameSpace= oOutlook.GetNamespace("MAPI")
> oFolder = oNameSpace.GetDefaultfolder(4)
> oSend = oFolder.Items(1).Send
>
>
>>I am sending e-mail messages in MS OutLook through Automation and OutLook is placing the messages in the OutBox, I want to know how to force Outlook to actually send the messages as if I clicked the send/receive button.
Mike,
Does this code send all items that may be in the Outbox folder? What is Items(1) here?
Thanks again.
Update. It didn't work and even introduced a problem with security warning again.
Update 2. I tried all methods from this ink
http://www.outlookcode.com/d/code/sendnow.htmNone worked for me - I'm using Office 2007 here.
Update 3. This code
Sync = loNameSpace.SyncObjects.ITEM(1)
Sync.START()
seems to work, though with a slight delay.
If it's not broken, fix it until it is.
My Blog