Hi
I have the code below, which launches a Word document. There are bookmarks set-up in this Word document, that I'd like to link to ,somehow, within the code below
any ideas much appreciated
Thanks
Richey
If IsNull(Me.List84) Then
Msgbox "Please select a Section", vbInformation
Else
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],16) = 'Section Plan.doc' and [filename] like '" & "*" & Me.List84 & "*" & "' and [filename] like '" & "*" & Me.cuser & "*" & "'"
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
Msgbox "Document not found", vbInformation
End If
End If
I have the code below, which launches a Word document. There are bookmarks set-up in this Word document, that I'd like to link to ,somehow, within the code below
any ideas much appreciated
Thanks
Richey
If IsNull(Me.List84) Then
Msgbox "Please select a Section", vbInformation
Else
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],16) = 'Section Plan.doc' and [filename] like '" & "*" & Me.List84 & "*" & "' and [filename] like '" & "*" & Me.cuser & "*" & "'"
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
Msgbox "Document not found", vbInformation
End If
End If