| Author |
Find Process ID from Process Name
|
|
| Andibevan 2006-04-26, 6:56 pm |
| If all I have is the process name, i.e. winword or msaccess, how can I find
out the process ID?
I only need to use this for MS Office products so there should be little
chance for 2 instances to be running.
I have been searching through various API sites but can't find the right
combination of functions.
| |
| Ken Halter 2006-04-26, 6:56 pm |
| "Andibevan" <andibevan@notherehotmail.com> wrote in message
news:uvBDbwUaGHA.3304@TK2MSFTNGP04.phx.gbl...
> If all I have is the process name, i.e. winword or msaccess, how can I
> find
> out the process ID?
>
> I only need to use this for MS Office products so there should be little
> chance for 2 instances to be running.
>
> I have been searching through various API sites but can't find the right
> combination of functions.
I have no idea if this'll run in VBA but.....
Enumerate all Currently Running Processes
http://www.thescarms.com/vbasic/RunningProcs.asp
....there are more where that came from <g>
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
| |
| Andibevan 2006-04-26, 6:56 pm |
|
"Ken Halter" <Ken_Halter@Use_Sparingly_Hotmail.com> wrote in message
news:O7TsW9UaGHA.4544@TK2MSFTNGP02.phx.gbl...
> "Andibevan" <andibevan@notherehotmail.com> wrote in message
> news:uvBDbwUaGHA.3304@TK2MSFTNGP04.phx.gbl...
>
> I have no idea if this'll run in VBA but.....
>
> Enumerate all Currently Running Processes
> http://www.thescarms.com/vbasic/RunningProcs.asp
>
> ...there are more where that came from <g>
>
> --
> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
>
>
Worked a treat - thanks
|
|
|
|