MS Access 2007 Open external file readonly

M

Mustufa Sange

I have an application developed to manage office documents in which i also
have to attach the files to the record. I attach the document to the record
by copying the file to the specific folder and file path is recorded in the
database. When user clicks the button file opens without problem , i use
the following commands to open the file i.e application.followhyperlink or
shellexecute.

My question is that based on the user right i would like to control the file
attribute, if user has Readonly access then then file should also open as
readonly so that user is not allowed to make changes to the file. Can any
one help me solve this problem.

Thankyou.
 
A

Alex Dybenko

Hi,
you can use GetAttr() function to read file attributes, but open file as
read-only - depends on the program you use to open file, if this program has
command-line switch to open file read-only - then you can use it. For
example Word does not have one, but Excel has - /r

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top