tags:

views:

42

answers:

1

Hi All, I open a file in windows word and get a handle to the window. Can I get the absolute path of the file (the actual .doc file, not the winword.exe)?

Thanks a lot

+1  A: 

You certainly won't be able to do this direct from the Windows API (where a program's document is stored and how it is manageded is not controlled / constrained by the Windows API)...

What you might be able to do is use the Word libraries to iterate through open documents and look for the document with a matching handle, but I doubt this will be simple - I'm not even sure if it will be possible...

Martin.

Martin Milan