Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking of an Office Application is running

Status
Not open for further replies.

Viruland

Programmer
Dec 6, 2000
61
0
0
BE
Is there a way to check if a Word application, Excell application or a Powerpoint application is running?


Live fast, die young and leave a beautiful corpse behind.
 
yes, try looping throught the processes

Code:
Dim objProcess As New Process
Dim objProcesses() As Process

objProcesses = Process.GetProcesses()
For Each objProcess In objProcesses
  If objProcess.processname.tolower = "word" Then
                messagebox.show("Found")
  End If
Next

You will have to check the exact processname for word.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top