I'm checking word process instances, I have open more then one instances of word instance but it returns only the first instance of word and return process.Count 1 , When I use notepad as process then it works but with winword it didn't works.
For Each a In p
If Not pName.Equals("") And I <= p.Count Then
Console.WriteLine(a)
Console.WriteLine(p.Count)
pName = p(I).MainWindowTitle.ToString
File.WriteLine("Word Process Name : {0} is started on time {1}", pName, p(I).StartTime)
fullPath = Path.GetFullPath(pName)
File.WriteLine("Path Of the file is : {0}", fullPath(0))
End If
Next