Dim objSet
Set objSet = GetObject("winmgmts:").InstancesOf("Win32_Process") For Each Item In objSet If Item.Name = "WINWORD.EXE" Or Item.Name = "EXCEL.EXE" Then pid = Item.Handle
Shell "ntsd -c q -p " & pid End If Next
Dim objSet
Set objSet = GetObject("winmgmts:").InstancesOf("Win32_Process") For Each Item In objSet If Item.Name = "WINWORD.EXE" Or Item.Name = "EXCEL.EXE" Then pid = Item.Handle
Shell "ntsd -c q -p " & pid End If Next