Forum Discussion

elyush's avatar
elyush
Occasional Contributor
15 years ago

How can i check that word document is read only?

Hi

I am doing some work, an then i want to check that i can not change word document.

i want to know if my word document is read only. how can i do it???

Is there any attribute for word document that i can use?



Thanks in advance.

2 Replies

  • Hi,



    You can also check file attributes via aqFileSystem object





    function IsReadOnly(Path)

    {

    if ((aqFileSystem.GetFileInfo(Path).Attributes & aqFileSystem.faReadOnly) == aqFileSystem.faReadOnly)

        return true; //file is read-only

      else

        return false; //file is not read-only

    }