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

using followhyperlink to open word as read-only

Status
Not open for further replies.

gwilym40

Programmer
May 2, 2002
31
GB
I've got the code below, which uses application.followhyperlink to open a word document if found. I'd like though, to open the document as read-only
How can I do this please?
Regards
Gwilym


Dim db As Database
Dim str As String
Dim strselect As String
Dim strinsert As String
Dim rst As Recordset
Dim link As String

Set db = CurrentDb
strselect = "SELECT * from tblfilenames where right([filename],11) = 'Summary.doc' and [filename] like '" & "*" & Me.strsect & "*" & "'"
Msgbox strselect
Set rst = db.OpenRecordset(strselect)
' Msgbox rst.RecordCount
If Not rst.EOF Then
link = rst("filepath")
Msgbox link
application.FollowHyperlink link, , True
Else
End If
db.close
 
Did you ever figure out how to open a Word Document as Read Only? I'm searching for that now...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top