View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default VBA to send Outlook email - stuck in Outbox

Hi Frank,

Am Tue, 21 Jun 2016 17:36:20 -0400 schrieb Phrank:

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)


step through your code with F8. After the line
Set OutApp = CreateObject("Outlook.Application")
you see the Outlook icon in the taskbar. Excel send the mail to the
outbox. With End Sub Outlook is nothing and it is closed. If you didn't
send immendiatly and the interval to send is longer than the macro needs
for running the mail remains in the outbox. Perhaps it tooks too long
time to sign in at the mail provider.
With stepping through the code check how long it last to send the mail
and let Excel wait this time.


Regards
Claus B.
--
Windows10
Office 2016