D Dan_T Registered User. Local time Today, 11:11 Joined Jul 14, 2004 Messages 116 Jun 29, 2005 #1 Can the read only property of a file, eg a word doc, be changed by code? Many thanks Dan.
ghudson Registered User. Local time Today, 06:11 Joined Jun 8, 2002 Messages 6,194 Jun 29, 2005 #2 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.
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.
D Dan_T Registered User. Local time Today, 11:11 Joined Jul 14, 2004 Messages 116 Jun 29, 2005 #3 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
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