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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ShellExecute call

Status
Not open for further replies.

McCabeTC

Programmer
Aug 6, 2003
28
US
Hello,

In my Visual Basic program, I am using the ShellExecute call to open a file in its own application. I was wondering if there is another function out there that will let me open the file with "read" access only, so that the users cannot modify it. I still would need to open it in its own application (do not want to use the OLE or WebBrowser controls).

Thanks,

TM
 

What you can try is to use the setattr function with the vbReadOnly attribute set prior to using shellexecute. Other wise you are going to have to create an instance of the application (if it supports it) and control it that way.

Good Luck

 
vb5prgrmr,

Thank you so much for your suggestion. It worked like a charm! I really appreciated your help.

Thanks again,

TM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top