Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i want to find the file name from winword process.when i open a word file it can see in

windows task manager(winword).so can i find the file name using this?

how to get this?


Thanks..
Posted
Updated 16-Jul-13 0:52am
v4

 
Share this answer
 
Comments
hasbina 16-Jul-13 3:01am    
@timmit18

how to kill the active process using the a code in the link you are provided?

Thanks..
You should be good with this one here

C#
var procs = Process.GetProcessesByName("winword");
     foreach (var item in procs)
       if (item.MainWindowTitle.Contains("yourfileName")) item.Kill();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900