如何从winword进程中查找文件名? [英] how to find file name from winword process?

查看:75
本文介绍了如何从winword进程中查找文件名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i想要从winword进程中找到文件名。当我打开一个word文件时,它可以在

中看到

windows任务管理器(winword)。所以我能用这个找到文件名吗?



如何获得这个?





谢谢..

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..

推荐答案

试试这个,



http://social.msdn.microsoft.com/Forums/en-US/40e14cbe-6453-4971-8c72-5e4ee5205a5d/how-to-get-the-filename-of- a-winword-document [ ^ ]


你应该在这里做得很好/>


You should be good with this one here

var procs = Process.GetProcessesByName("winword");
     foreach (var item in procs)
       if (item.MainWindowTitle.Contains("yourfileName")) item.Kill();


这篇关于如何从winword进程中查找文件名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆