amg2
Computer
- Aug 18, 2003
- 2
I don't know how to watch the bookmark contents on the screen. I have typed the following:
dim lbookmark as string
If ActiveDocument.Bookmarks.Exists("BMK_Phone1"
= True Then
ActiveDocument.Bookmarks("BMK_Phone1"
.Range.Text = "Pepe"
End If
lbookmark = ActiveDocument.Bookmarks("BMK_Phone1"
.Range.Text
If ActiveDocument.Bookmarks("BMK_Phone1"
.Range.Text = "Pepe" Then
Msgx = "Phone1 value is Pepe"
Tit = "Warning"
rc = MsgBox(Msgx, vbOKOnly, Tit)
Else
Msgx = "Phone1 value is " & lbookmark
Tit = "Warning"
rc = MsgBox(Msgx, vbOKOnly, Tit)
End If
The result after running this lines is lbookmark="" instead of Pepe and I don't know why. Anyone knows what's the problem?
Thank you very much.
dim lbookmark as string
If ActiveDocument.Bookmarks.Exists("BMK_Phone1"
ActiveDocument.Bookmarks("BMK_Phone1"
End If
lbookmark = ActiveDocument.Bookmarks("BMK_Phone1"
If ActiveDocument.Bookmarks("BMK_Phone1"
Msgx = "Phone1 value is Pepe"
Tit = "Warning"
rc = MsgBox(Msgx, vbOKOnly, Tit)
Else
Msgx = "Phone1 value is " & lbookmark
Tit = "Warning"
rc = MsgBox(Msgx, vbOKOnly, Tit)
End If
The result after running this lines is lbookmark="" instead of Pepe and I don't know why. Anyone knows what's the problem?
Thank you very much.