ControlCollection.AddBookmark Method (Bookmark, String)
Adds a new Microsoft.Office.Tools.Word.Bookmark control to the document at the location of the existing Microsoft.Office.Interop.Word.Bookmark specified.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
Function AddBookmark ( _
bookmark As Bookmark, _
name As String _
) As Bookmark
Bookmark AddBookmark(
Bookmark bookmark,
string name
)
Parameters
- bookmark
Type: Microsoft.Office.Interop.Word.Bookmark
The existing Microsoft.Office.Interop.Word.Bookmark that you want to replace with a new Microsoft.Office.Tools.Word.Bookmark control.
- name
Type: System.String
The name that can be used to index the control in the ControlCollection instance.
Return Value
Type: Microsoft.Office.Tools.Word.Bookmark
The Microsoft.Office.Tools.Word.Bookmark control that was added to the ControlCollection instance.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.