如何关闭一个打开的word文件 [英] How to close an open word file

查看:77
本文介绍了如何关闭一个打开的word文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





i想检查一个word文件,它是否存在于路径文件夹中(这是用File.Exists完成的) Path \FileName))



之后我想搜索一下,文件是否打开,如果打开则关闭文件。



请给出解决方案

Hi,

i want to check for a word file that ,Is it exist in the path folder or not(that''s done with File.Exists(Path\FileName))

after this I want to search that, Is file is open or not, if open then close the file.

please give the solution

推荐答案

您可以使用处理 [ ^ ]。如果您发现文档已打开,请将其关闭。



此示例 [ ^ ]应该帮助你。
You can close the file using the Process class[^]. If you find the document open, close it.

This sample[^] should help you out.


这篇关于如何关闭一个打开的word文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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