Who has the file open?

  • Thread starter Stephen English
  • Start date
S

Stephen English

Hi Howard
Looks like an interesting site. However, it does not appear that I can
find the author from my VBA code. If you try to open a file from Windows
Explorer, it will tell you who has it open - can I do that in VBA?
Thanks
Stephen
 
S

Shauna Kelly

Hi Stephen

When Word opens a file, it creates a temporary 'lock' file that tells it
that the file is in use. If the document is 123456.doc, then the lock file
is ~$3456.doc, and it's in the same folder as 123456.doc.

Open the lock file as plain text: you can read the user's name in the file.

For obvious reasons, it will report spurious results if more than one person
has opened the file.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top