title: Programatically get path of open Excel/Word-document
body: <p>Is there any way to get the path of documents currently open in Microsoft Word and Microsoft Excel?</p>
  
  <p>I know how I can fetch the PID and the window handle for the running instance of Excel or Word, but I have no idea how to get the path of the open document. Is it even possible?</p>
  
  <p>I am thinking that an API would be nice, but I doubt it even exists. Perhaps some kind of plugin that sends information to my application is a possibility? (But if any other way is possible, I'd like to avoid having to install plugins everywhere.)</p>
  
  <p>I would prefer to do it using C#, but anything that can be compiled into an executable is alright.</p>
  
  <p>And just in case someone thinks this sounds fishy, it is not to be used for anything remotely illegal. It is for a data collection system at work.</p>