Hi, I'm trying to check the Read Only and Password protection properties of
a list of Word (and Excel) files by a macro. Is there a VBA method, that I
can use in batch, to check these properties without actually opening the
file itself? If the
file is password protected I obviously cannot open the document in batch to
check the ActiveDocument property.
Check if the document is read only
ActiveDocument.ReadOnly
ActiveDocument.ReadOnlyRecommended
Or a way to find out if document has been password protected:
ActiveDocument.SaveAs .. Password:="pwd"
ActiveDocument.SaveAs .. WritePassword:="pwd"
I tried to use the "Microsoft Scripting Runtime" library FileSystemObject
but it did not give me the file properties I needed. If possible, I would
like to run this check from an Excel macro.
Thanks for your help in advance, E
Jean-Guy Marcil - 29 Sep 2005 15:18 GMT
Eithne R was telling us:
Eithne R nous racontait que :
> Hi, I'm trying to check the Read Only and Password protection
> properties of a list of Word (and Excel) files by a macro. Is there
[quoted text clipped - 16 lines]
>
> Thanks for your help in advance, E
See
http://word.mvps.org/FAQs/MacrosVBA/CheckIfPWProtectB4Open.htm
for an example.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org