Link to home
Start Free TrialLog in
Avatar of joe_s
joe_s

asked on

Stopping a running app from VB

I need to stop and restart (reboot) another application from within my VB app. For example, 'myapp' needs to stop stop MS Word and then restart it. Does anyone know the best way to do this?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of waty
waty
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
To find the hwn of the application :

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long


   nHwnd = FindWindow("Your Program", vbNullString)

Avatar of MikeP090797
MikeP090797

Use "OpusApp" for word
Avatar of joe_s

ASKER

Thanks, That's just what I needed.