简体   繁体   中英

How to Find and Close an open Office document via Office Automation

I have a program that will take the files in a directory and upload them to a server. If the file is a Word File, I would then like to detect if the file is open in word / excel etc. If it is open, I would like to be able to then close it, in order to delete the local copy of the file.

Any ideas how to do this? The program responsible for the detection and closing of the documents is a win forms app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM