Click to See Complete Forum and Search --> : Getting Process ID from Word


pueromane
January 10th, 2000, 02:20 PM
I have a makro in Word and want to get the handle to my Word. My makro starts an external process which is waiting (with WaitForSingleObject) until word is closed and then does some things. So therefor I need the handle to my word.
Does anyone know how I can get this.

mfG Pueromane

Lothar Haensler
January 11th, 2000, 02:06 AM
there are quite a few handles you might want to get.
if you want to get the window handle of your word instance, try FindWindow API or use GetActiveWindow.
If you need the process handle from within the current makro try GetCurrentProcess API