Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2005

Tip: Looking for answers? Try searching our database.

Checking readonly & password without opening file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eithne R - 28 Sep 2005 20:03 GMT
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 

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.