-
Notifications
You must be signed in to change notification settings - Fork 61
/
word.selectionmode.yml
54 lines (42 loc) · 1.69 KB
/
word.selectionmode.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
### YamlMime:TSEnum
name: Word.SelectionMode
uid: 'word!Word.SelectionMode:enum'
package: word!
fullName: Word.SelectionMode
summary: This enum sets where the cursor (insertion point) in the document is after a selection.
remarks: >-
\[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
#### Examples
```TypeScript
// 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();
});
```
isPreview: false
isDeprecated: false
fields:
- name: end
uid: 'word!Word.SelectionMode.end:member'
package: word!
summary: |-
The cursor is at the end of the selection (just after the end of the selected range).
* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"End"'
- name: select
uid: 'word!Word.SelectionMode.select:member'
package: word!
summary: |-
The entire range is selected.
* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"Select"'
- name: start
uid: 'word!Word.SelectionMode.start:member'
package: word!
summary: |-
The cursor is at the beginning of the selection (just before the start of the selected range).
* \[ [API set: WordApi 1.1](/javascript/api/requirement-sets/word/word-api-requirement-sets) \]
value: '"Start"'