A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do pause in Outlook.Quit



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 19th 08, 01:38 PM posted to microsoft.public.outlook.program_vba
Andrey_R
external usenet poster
 
Posts: 13
Default How do pause in Outlook.Quit

I have a problem. In outlook's addins crash, if I close it before the
advanceSearch end. I do check in application.Quit. But outlook still close.
Then it open. And when search finish, it close again. I see it on my log. How
do I right?
Ads
  #2  
Old August 19th 08, 03:42 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How do pause in Outlook.Quit

By the time application.Quit() fires the Outlook objects are already out of
scope. Probably you can check for the Explorer.Close() and Inspector.Close()
events on any open Explorer or Inspector and if it's the last Explorer
closing or last Inspector and there are no Explorers then use that as your
signal that Outlook is closing down.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Andrey_R" wrote in message
...
I have a problem. In outlook's addins crash, if I close it before the
advanceSearch end. I do check in application.Quit. But outlook still
close.
Then it open. And when search finish, it close again. I see it on my log.
How
do I right?


  #3  
Old August 21st 08, 09:45 AM posted to microsoft.public.outlook.program_vba
Andrey_R
external usenet poster
 
Posts: 13
Default How do pause in Outlook.Quit


Thanks Ken. I do pause in Explorer.Close() and Inspector.Close(). But
Outlook still closed at once and when search finished, log write open and
close. Are objects in this metods already out of scope?
  #4  
Old August 21st 08, 03:03 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default How do pause in Outlook.Quit

Your Outlook objects aren't out of scope yet when Explorer.Close() and
Inspector.Close() fire. If you determine in those event handlers that
Outlook is closing and an advanced search is in progress just call its
Stop() method, then call a procedure to release all of your Outlook objects.
That should let Outlook close properly.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Andrey_R" wrote in message
...

Thanks Ken. I do pause in Explorer.Close() and Inspector.Close(). But
Outlook still closed at once and when search finished, log write open and
close. Are objects in this metods already out of scope?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for code to wait/pause for input... [email protected] Outlook and VBA 9 February 28th 08 10:35 PM
Outlook Script: insert a pause in do while bbnimda Outlook - Using Forms 0 December 14th 07 10:31 AM
Outlook seems to pause/freeze once in a while while reading e-mails. Phillip Pi Outlook - General Queries 2 May 16th 06 02:20 AM
How do I programme a pause in a number dialed from contacts? timbrownsc Outlook - Using Contacts 0 April 18th 06 04:56 PM
pause in script Joel Allen Outlook and VBA 6 February 27th 06 07:28 AM


All times are GMT +1. The time now is 08:51 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.