Share via


Bookmarks.Exists Method

Word Developer Reference

Determines whether the specified bookmark exists. Returns True if the bookmark exists.

Syntax

expression.Exists(Name)

expression   A variable that represents a Bookmarks object.

Parameters

Name Required/Optional Data Type Description
Name Required String A bookmark name.

Example

This example determines whether the bookmark named "start" exists in the active document. If the bookmark exists, it is deleted.

Visual Basic for Applications
  If ActiveDocument.Bookmarks.Exists("start") = True Then
    ActiveDocument.Bookmarks("start").Delete
End If

See Also