Board index » Visual Studio » Detect if Ms Word Application is running or not.

Detect if Ms Word Application is running or not.

Visual Studio321
Good day,



VB 6. How can we detect if Ms Word Application is running or not.



Many thanks.

Jenni


-
 

Re:Detect if Ms Word Application is running or not.

GetObject returns an existing instance if there is one...



Dim pWordApp as object



on error resume next

Set pWordApp = GetObject("Word.Application")

on error goto 0



if pWordApp is nothing then

MsgBox "Word is not running"

end if













"Jenni" <turtle@fptnet.com.vn>wrote in message

Quote
Good day,



VB 6. How can we detect if Ms Word Application is running or not.



Many thanks.

Jenni









-

Re:Detect if Ms Word Application is running or not.

Many thanks

Jenni



"Jezebel" <dwarves@heaven.com.kr>wrote in message

Quote
GetObject returns an existing instance if there is one...



Dim pWordApp as object



on error resume next

Set pWordApp = GetObject("Word.Application")

on error goto 0



if pWordApp is nothing then

MsgBox "Word is not running"

end if













"Jenni" <turtle@fptnet.com.vn>wrote in message

news:%2310iD5kMEHA.892@TK2MSFTNGP09.phx.gbl...

>Good day,

>

>VB 6. How can we detect if Ms Word Application is running or not.

>

>Many thanks.

>Jenni

>

>









-