View Single Post
 
Old 10-29-2022, 01:09 PM
bugy bugy is offline Windows 10 Office 2010
Novice
 
Join Date: Jan 2019
Posts: 16
bugy is on a distinguished road
Default

Sorry for my english, it's poor.
I have a document with inserted bookmarks.
The document is created by a VB6 program.
I have tried to read the value of the bookmark, but there is no way.
I have used a code that was sent to me in this forum. It detects the bookmark but does not read the value.

Quote:
Sub TestBookmark()
Dim oBM As Bookmark
If ActiveDocument.Bookmarks.Exists("code") Then
Set oBM = ActiveDocument.Bookmarks("code")
MsgBox oBM.Range.Text
Else
MsgBox "This bookmark doesn't exist" & vbCr & "code"
End If
End Sub
Reply With Quote