Change file read only property.

Dan_T

Registered User.
Local time
Today, 11:11
Joined
Jul 14, 2004
Messages
116
Can the read only property of a file, eg a word doc, be changed by code?

Many thanks

Dan.
 
Use the SetAttr Statement.

This will set the file to Read-Only...
Code:
SetAttr "C:\Temp\Test.doc", vbReadOnly

This will remove the Read-Only attribute...
Code:
SetAttr "C:\Temp\Test.doc", vbNormal

Check out the Access help files for the SetAttr Statement for more info and the other arguments.
 
Thank you very much. That's exactly what I was looking for a pointer to the correct statement or method and you have done just that.

Cheers

Dan
 

Users who are viewing this thread

Back
Top Bottom