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
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