Bookmarks.Add Method
Adds a bookmark to a range.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)
Syntax
'Declaration
Function Add ( _
Name As String, _
ByRef Range As Object _
) As Bookmark
'Usage
Dim instance As Bookmarks
Dim Name As String
Dim Range As Object
Dim returnValue As Bookmark
returnValue = instance.Add(Name, Range)
Bookmark Add(
string Name,
ref Object Range
)
Parameters
- Name
Type: System.String
The name of the bookmark. The name cannot be more than one word.
- Range
Type: System.Object%
The range of text marked by the bookmark. A bookmark can be set to a collapsed range (the insertion point).
Return Value
Type: Microsoft.Office.Interop.Word.Bookmark
A Bookmark object that represents the bookmark added to the range.