如果活动文档中存在名为“temp”并且为第一个书签,则本示例删除该书签。

Dim intResponse As Integer
Dim strBookmark As String
strBookmark = "temp"
intResponse = MsgBox("Are you sure you want to delete " _
& "the bookmark named """ & strBookmark & """ ", vbYesNo)
If intResponse = vbYes Then
    If ActiveDocument.Bookmarks.Exists(Name:=strBookmark) _
        And ActiveDocument.Bookmarks.Item(1).Name = strBookmark Then
        ActiveDocument.Bookmarks(1).Delete
    End If
End If