Password protected documents

N

Naz

Hi all

I have a folder with over 5000 documents in it, all of them should be
password protected. But we have discovered a few that are not, and think that
there may be more.

Is there a way to write some VBA that can check the files in the folder and
provide a list of the files without a password.

All help is greatly appreciated

Naz
 
J

Jay Freedman

Naz said:
Hi all

I have a folder with over 5000 documents in it, all of them should be
password protected. But we have discovered a few that are not, and
think that there may be more.

Is there a way to write some VBA that can check the files in the
folder and provide a list of the files without a password.

All help is greatly appreciated

Naz

Yes, you (of someone else) can adapt the macro in
http://www.word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.htm.

I think all you'd need to do is add code to the beginning of the macro to
create a blank document as a "log", remove the Debug.Print statement under
Case 5408 (you don't care about files that are protected), and replace the
Debug.Print statement under Case 0 with a statement that writes the filename
to the log document (followed by a paragraph mark, which is the character
vbCr).

If you need help with this, post a request to
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.word.vba.beginners.
Be specific about what code you have and what isn't working.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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