Good morning,
How do I know if an MS Word document is open?
You have to take into account that the user can have several MS Word documents open, but I want to know if one is open in order to avoid opening it.
Thank you.
SOLUTION:
I solved it using the Handle.exe application from Sysinternals by Microsoft.
This executable returns if a filename is being used and also tells you the full path as the application that uses it.
Example:
handle.exe -nobanner test.docx
Result:
WINWORD.EXE pid: 3876 type: File 1454: C:\process\test.docx