Word.SelectionMode enum
表示在文档中选择后设置光标 (插入点) 的位置。
注解
使用方
- Word.正文: 选择
- Word.ContentControl: select
- Word.字段:选择
- Word.InlinePicture: 选择
- Word.段落:选择
- Word.范围:选择
- Word.表: 选择
- Word.TableRow: select
示例
// 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();
});
字段
| end = "End" | 光标位于所选内容的末尾 (就在所选区域) 的末尾之后。 |
| select = "Select" | 将选中整个范围。 |
| start = "Start" | 光标位于所选区域 (的开头,就在所选区域) 的开始之前。 |