Word.SelectionMode enum
此枚举设置文档中光标 (插入点) 在选定内容之后的位置。
注解
示例
// 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" | 光标位于所选区域 (开始) 的开头。 |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈