Matthew Nicoll
2009-10-09 17:40:13 UTC
MS Office 2007. From Access VBA I open an outlook message:
Dim ObjOL As New Outlook.Application, objMail As mailitem
Set objMail = ObjOL.CreateItem(olMailItem)
'--- then I set objmail.to, subject and body.
objMail.Display
This opens the new message in Outlook window, I check the message,
then click Send.
If Outlook was already open, the message goes into the Outbox for a
second or two, then it get sent.
If Outlook was NOT open, the message goes into the Outbox and does
NOT get sent !
In Outlook options I've got selected:
"Send immediately when connected"
"Perofrm an automatic sned/receive when exiting"
How can I pursuade Outlook to send the message before closing ?
(Outlook is not my usual mail program, so I don't leave it open.)
Dim ObjOL As New Outlook.Application, objMail As mailitem
Set objMail = ObjOL.CreateItem(olMailItem)
'--- then I set objmail.to, subject and body.
objMail.Display
This opens the new message in Outlook window, I check the message,
then click Send.
If Outlook was already open, the message goes into the Outbox for a
second or two, then it get sent.
If Outlook was NOT open, the message goes into the Outbox and does
NOT get sent !
In Outlook options I've got selected:
"Send immediately when connected"
"Perofrm an automatic sned/receive when exiting"
How can I pursuade Outlook to send the message before closing ?
(Outlook is not my usual mail program, so I don't leave it open.)