VBA to send Outlook email - stuck in Outbox
On Wed, 22 Jun 2016 15:44:29 +0200, Claus Busch
wrote:
Hi Frank,
Am Wed, 22 Jun 2016 08:12:35 -0400 schrieb Phrank:
Ah, I was actually wondering about that after I sent my message
yesterday. I just tested it, and I'm not actually seeing the Outlook
icon show up in my taskbar. I have it pinned there, and when it's
opened, you can see it's highlighted, but it never highlights as if
it's open. The only time it highlights is when it gets to the
.Display line of code, and then only briefly. I delayed a long time
after hitting .Send, but the message remained in my Outbox.
the Outlook icon is shown right in the info bar of the task bar with a
big orange dot on it. When you hoover over the icon you can read
"Another program is using Outlook".
I stepped through again, this time with the Locals window open, and
at the OutApp step, it's showing AnswerWizard in the Expression field,
and <operation failed in the Value field. And of course, under the
OutMail expression, there's Application, which shows a value of <The
operation failed. Which is telling me that it's not opening an
instance of Outlook, which is probably why the message is remaining in
the Outbox. Any thoughts on why and how to get that to not fail?
What Excel and what Outlook versions do you use? Are they different? If
you send from Outlook must you sign in or are you signed in
automatically? Do you always have an Internet connection?
I guess the failure is from Outlook and not from Excel.
Regards
Claus B.
Hi Claus. My program versions a
- Outlook: Outlook 2016, version 16.0.6741.2047
- Excel: Excel 2016, MSO (16.0.6925.1018) 32-bit (this is the latest
version)
So yes, they are slightly different, but still 2016. I don't need to
sign in to send from Outlook. I do need to sign into our company's
network, but I need to do that to use Excel too. Yes, I do always
have an internet connection. And I agree, the issue seems to generate
from Outlook, not Excel. It seems the macro is working just fine; the
email simply won't release from Outlook, no matter what we try. And
that seems to be the general theme of what I've read from other users
that have encountered the same issue, and there simply doesn't seem to
be a universal, clean solution to this issue.
As I mentioned in my original post, we are going to use a 'high tech'
solution of setting a Window's Task Scheduler event to open Outlook 1
minute before our main event kicks off, which will ensure Outlook is
open. Seems like a truly silly work around, but it should work.
Thanks for your help Claus.
Frank
|