Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a File Read Only

Status
Not open for further replies.

johnmtb

Programmer
Jul 12, 2008
37
US
Dear All,

I have a simple programme which searches for a file, and upon locating it, opens it. However, I receive the following error message “…user does not have access privileges.”

I have tried to open the file “read only”, but I cannot find the correct method. Everything I have tried has been incorrect.

My current line of coding which will generate the error message is:

Code:
Set WordFile = WordObj.Application.Documents.Open(POFileName)

Can you help me please?

Regards,

john
 
Possibly the file itself has protection.
If not, then I guess the folder.

Where is the file located and what version of the Operating System are you using for this? And what version of Word?

The file should be located in /%All Users%/ or in your own Profile user folder, or other public folder.

 
Dear All,

it appears that the person who wrote the file had locked it accidentally. it is now unlocked and my programme works fine.

thank you SBerthold.

regards,

john
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top