C
CaptainBly
I have written a small access program that opens up Outlook, checks the
inbox for emails with a particular subject. It it finds one it grabs
some information out of it, formats a new excel spreadsheet and sends
this result to the requestor. I have this running unattended as a
scheduled task every 10 minutes on one of the clients servers.
This all works great. No problems at all.
Every once in a while though, for whatever reason, the Exchange server
is down. In the VBA when I try to do the "Set olookApp =
CreateObject("Outlook.Application")" it doesn't generate a trapable
error but Outlook pops up a warning box saying something to the point
of "The exchange server is not available at this time, would you like
to open anyway (Yes, NO)" My program just sits there waiting for
someone to say yes or no. The program has no idea that Outlook has
asked for user interaction.
Well, I have this program running as a scheduled task every 10 minutes.
The program will never take more than a minute or two to run. If this
thing pops up, it freezes my program because this is an unattended task
so no one is sitting there looking at it.
Is there some way, programatically to determine if exchange is up and
running or runnable before I try to initiate outlook? Or is there
someway to skip this error in Outlook? Even if exchange is not
available, my program will still work, the actual email just won't be
physically sent.
Any ideas? This is a real pain when Exchange is not available. It
ends up with a bunch of copies of access with the "A Serious error has
occured, would you like to send to microsoft....." error screen but in
reality, nothing bad happened, it was all just that exchange wasn't
there.
inbox for emails with a particular subject. It it finds one it grabs
some information out of it, formats a new excel spreadsheet and sends
this result to the requestor. I have this running unattended as a
scheduled task every 10 minutes on one of the clients servers.
This all works great. No problems at all.
Every once in a while though, for whatever reason, the Exchange server
is down. In the VBA when I try to do the "Set olookApp =
CreateObject("Outlook.Application")" it doesn't generate a trapable
error but Outlook pops up a warning box saying something to the point
of "The exchange server is not available at this time, would you like
to open anyway (Yes, NO)" My program just sits there waiting for
someone to say yes or no. The program has no idea that Outlook has
asked for user interaction.
Well, I have this program running as a scheduled task every 10 minutes.
The program will never take more than a minute or two to run. If this
thing pops up, it freezes my program because this is an unattended task
so no one is sitting there looking at it.
Is there some way, programatically to determine if exchange is up and
running or runnable before I try to initiate outlook? Or is there
someway to skip this error in Outlook? Even if exchange is not
available, my program will still work, the actual email just won't be
physically sent.
Any ideas? This is a real pain when Exchange is not available. It
ends up with a bunch of copies of access with the "A Serious error has
occured, would you like to send to microsoft....." error screen but in
reality, nothing bad happened, it was all just that exchange wasn't
there.