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!

manipulating bookmarks in word

Status
Not open for further replies.

Richey

Technical User
Aug 29, 2000
121
GB
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

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top