Reputation: 19
In my application,i am creating the word document using vb.net.if i close the application and running again and open the same document..but the document is already opened,how to check the word document is already opened or not..?
Upvotes: 0
Views: 1203
Reputation: 1515
try this:
Dim p() As Process = Process.GetProcessesByName("WinWord")
If p.Count = 0 Then
' No word instance opened
Else
' Any Word instance opened
End If
Upvotes: 1