Bookmarks.Add Method
Word Developer Reference |
Returns a Bookmark object that represents a bookmark added to a range.
Syntax
expression.Add(Name, Range)
expression Required. A variable that represents a Bookmarks collection.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Name | Required | String | The name of the bookmark. The name cannot be more than one word. |
Range | Optional | Variant | The range of text marked by the bookmark. A bookmark can be set to a collapsed range (the insertion point). |
Return Value
Bookmark
Example
This example adds a bookmark named myplace to the selection in the active document.
Visual Basic for Applications |
---|
|
This example adds a bookmark named mark at the insertion point.
Visual Basic for Applications |
---|
|
This example adds a bookmark named third_para to the third paragraph in Letter.doc, and then it displays all the bookmarks for the document in the active window.
Visual Basic for Applications |
---|
|
See Also