hendricksonet
Programmer
Is there any way to view/close applications that are listed in the windows task manager applications tab without having to use the Word.Application object?
The following code works fine, but I need to get this to work even if Word isn't installed on the PC.
********************************************
Brief description: This code looks at the Task Manager App list and closes apps that are not named AppName or Manger
********************************************
Set objWord = CreateObject("Word.Application")
Set colTasks = objWord.Tasks
For Each objTask in colTasks
If objTask.Visible Then
If InStr(CStr(Trim(objTask.Name)),"AppName") OR _
InStR(CStr(Trim(objTask.Name)),"Manager") Then
'do nothing
Else
colTasks(objTask.Name).Close
End If
End If
Next
objWord.Quit
********************************************
The following code works fine, but I need to get this to work even if Word isn't installed on the PC.
********************************************
Brief description: This code looks at the Task Manager App list and closes apps that are not named AppName or Manger
********************************************
Set objWord = CreateObject("Word.Application")
Set colTasks = objWord.Tasks
For Each objTask in colTasks
If objTask.Visible Then
If InStr(CStr(Trim(objTask.Name)),"AppName") OR _
InStR(CStr(Trim(objTask.Name)),"Manager") Then
'do nothing
Else
colTasks(objTask.Name).Close
End If
End If
Next
objWord.Quit
********************************************