PC Review


Reply
Thread Tools Rate Thread

Close All Instances of Microsoft Outlook with VBA

 
 
bobdydd
Guest
Posts: n/a
 
      21st May 2006
Hi Everybody

Windows XP, Access 2000, Outlook 2000

I am looking for a way to Close All Instances of Microsoft Outlook,
with VBA.

Both the "Seen One" and the unseen ones that you see when
you do a Ctrl Alt Del, and see them all sitting there in the task
manager.

I would like to have a Command Button that shuts them all.

Regards Bob

 
Reply With Quote
 
 
 
 
arthurjr07@gmail.com
Guest
Posts: n/a
 
      22nd May 2006
Dim objs as Object
Dim obj as Object
Dim strSQL as String
Dim strWMI as String
strWMI = "winmgmts:"
strSQL = "Select * From Win32_Process "
strSQL = strSQL & "where Name = 'OUTLOOK.EXE'"
Set objs = GetObject(strWMI).ExecQuery(strSQL)
For Each obj In objs
obj.Terminate
Next
Set objs = Nothing


HTH
Arthur

 
Reply With Quote
 
arthurjr07@gmail.com
Guest
Posts: n/a
 
      22nd May 2006
Dim objs as Object
Dim obj as Object
Dim strSQL as String
Dim strWMI as String
strWMI = "winmgmts:"
strSQL = "Select * From Win32_Process "
strSQL = strSQL & "where Name = 'OUTLOOK.EXE'"
Set objs = GetObject(strWMI).ExecQuery(strSQL)
For Each obj In objs
obj.Terminate
Next
Set objs = Nothing


HTH
Arthur

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Close all Instances of Excel Alan Microsoft Access VBA Modules 1 30th Aug 2009 02:24 AM
Multiple Instances in Task Manager After Close (Outlook 2002) Dale Durnell Microsoft Outlook Discussion 2 9th Feb 2005 09:49 PM
Re: close any instances of Outlook Geoff Microsoft Access VBA Modules 0 7th Jul 2004 10:27 PM
Excel Instances don't close =?Utf-8?B?SWFuVw==?= Microsoft Dot NET 6 28th Apr 2004 10:01 AM
Running 2 instances of Microsoft Exchange Server on one Outlook Eric Bolt Microsoft Outlook Discussion 1 26th Nov 2003 06:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:34 PM.