Skip to main content

Word.Bookmark

Word.Bookmark is an object type of the Word module (Office.word(iframe)). 5 methods.

Generated from the SDK type definitions

Word · 14 object types · 259 methods · namespace Word. This reference is generated from the API document artifact (sdk-api-doc.html) produced with the SDK build. Descriptions are the editor's API comments as published. Pin the SDK and Office versions together and regenerate when either changes.

Remarks

Methods

MethodDescription
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

Promise<void>

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

Promise<void>