By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,488 Members | 2,545 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,488 IT Pros & Developers. It's quick & easy.

Close All Instances of Microsoft Outlook with VBA

P: n/a
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

May 21 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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

May 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.