Word.Bookmark
Word.Bookmark is an object type of the Word module (Office.word(iframe)). 5 methods.
Remarks
- Module: Word ·
Office.word(iframe)· namespaceWord - Obtained from:
Document.getBookmark(name),Document.getBookmarks(includeHidden),Range.getBookmarks(),Range.insertBookmark(name) - Every method returns a
Promise; signatures use TypeScript notation.
Methods
| Method | Description |
|---|---|
delete() | Deletes the bookmark. |
exists() | Returns whether the bookmark exists. |
getName() | Returns the bookmark name. |
getRange() | Returns the range at which the bookmark marker is placed. |
goTo() | Moves the cursor to the bookmark position. |
Method details
delete()
Deletes the bookmark.
delete(): Promise<void>;
Returns
none
exists()
Returns whether the bookmark exists.
exists(): Promise<boolean>;
Returns
Promise<boolean> - true if it exists
getName()
Returns the bookmark name.
getName(): Promise<string>;
Returns
Promise<string> - bookmark name
getRange()
Returns the range at which the bookmark marker is placed.
getRange(): Promise<Range>;
Returns
Promise<Range> - marker position range
goTo()
Moves the cursor to the bookmark position. - Does not change document content; does nothing if the bookmark does not exist.
goTo(): Promise<void>;
Returns
none