Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Word.SelectionMode enum
- Package:
- word
Represents where the cursor (insertion point) is set in the document after a selection.
Remarks
Used by
- Word.Body: select
- Word.ContentControl: select
- Word.Field: select
- Word.InlinePicture: select
- Word.Paragraph: select
- Word.Range: select
- Word.Table: select
- Word.TableRow: select
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/scroll-to-range.yaml
await Word.run(async (context) => {
// Select can be at the start or end of a range; this by definition moves the insertion point without selecting the range.
context.document.body.paragraphs.getLast().select(Word.SelectionMode.end);
await context.sync();
});
Fields
| end = "End" | The cursor is at the end of the selection (just after the end of the selected range). |
| select = "Select" | The entire range is selected. |
| start = "Start" | The cursor is at the beginning of the selection (just before the start of the selected range). |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
