E
Eithne R
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
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