![]() |
Closing Outlook correctly
I need to close outlook fro a spearate process or detect that it cannot be
closed. What I am proposing to do it open outlook and then quit. Check if there is any explorer or inspector [cannot close]. If none them delete any process outlook.exe there might be in the background. Do this sound sound? -- Philip Painter, HP |
Closing Outlook correctly
If there are no Explorers or Inspectors then Outlook is either running with
no UI or the UI is closing down. You can call Application.Quit to get Outlook to close or you could even send a Windows message to Outlook to shut down but if any other code is running in the background that has Outlook references Outlook would still hang in the background. Forcing the various Outlook windows to close using Win32 API calls might not be such a great idea, it could corrupt things nicely. What are you trying to do and why? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "PhilipPainter" wrote in message ... I need to close outlook fro a spearate process or detect that it cannot be closed. What I am proposing to do it open outlook and then quit. Check if there is any explorer or inspector [cannot close]. If none them delete any process outlook.exe there might be in the background. Do this sound sound? -- Philip Painter, HP |
Closing Outlook correctly
I'm trying to close outlook prior to running a tool EMWProf which updates
profiles. -- Philip Painter, HP "Ken Slovak - [MVP - Outlook]" wrote: If there are no Explorers or Inspectors then Outlook is either running with no UI or the UI is closing down. You can call Application.Quit to get Outlook to close or you could even send a Windows message to Outlook to shut down but if any other code is running in the background that has Outlook references Outlook would still hang in the background. Forcing the various Outlook windows to close using Win32 API calls might not be such a great idea, it could corrupt things nicely. What are you trying to do and why? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "PhilipPainter" wrote in message ... I need to close outlook fro a spearate process or detect that it cannot be closed. What I am proposing to do it open outlook and then quit. Check if there is any explorer or inspector [cannot close]. If none them delete any process outlook.exe there might be in the background. Do this sound sound? -- Philip Painter, HP |
Closing Outlook correctly
Then checking for Explorers.Count and Inspectors.Count and issuing
Application.Quit is probably the best way to go. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "PhilipPainter" wrote in message ... I'm trying to close outlook prior to running a tool EMWProf which updates profiles. -- Philip Painter, HP |
All times are GMT +1. The time now is 05:03 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com