ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Outlook Again (https://www.excelbanter.com/excel-programming/362513-outlook-again.html)

gti_jobert[_122_]

Outlook Again
 

Hi all,

I have a function that opens Outlook but then loops continously until
the Sent Items Folder count has incremented by 1 (confirming the email
has been sent) but IF the user decides not to send the email, and
closes excel then the do loop will carry on and on (like a duracell
battery) and basically crashes excel.

within my do loop I need something that can determine.check whether or
not Outlook has been exited or something on those lines?!

Any help appreciated! Cheers guys!


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=545784


Bob Phillips

Outlook Again
 
Closes Excel, do you mean Outlook? If so, just check if there is still an
instance of Outlook running, using GetObject.

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"gti_jobert" wrote
in message ...

Hi all,

I have a function that opens Outlook but then loops continously until
the Sent Items Folder count has incremented by 1 (confirming the email
has been sent) but IF the user decides not to send the email, and
closes excel then the do loop will carry on and on (like a duracell
battery) and basically crashes excel.

within my do loop I need something that can determine.check whether or
not Outlook has been exited or something on those lines?!

Any help appreciated! Cheers guys!


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile:

http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=545784





All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com