Word.SelectionMode enum

文書内で選択した後にカーソル (カーソル) が置かれている場所を表します。

注釈

API セット: WordApi 1.1

使用元

例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/scroll-to-range.yaml

// Moves the insertion point to the end of the final paragraph.
await Word.run(async (context) => {
  const lastRange: Word.Range = context.document.body.paragraphs.getLast().getRange();
  const selectionMode: Word.SelectionMode = Word.SelectionMode.end;
  lastRange.select(selectionMode);

  await context.sync();
});

フィールド

end = "End"

カーソルが選択範囲の最後 (選択した範囲の終了直後) にあります。

select = "Select"

範囲全体が選択されます。

start = "Start"

カーソルが選択範囲の先頭 (選択した範囲の開始直前) にあります。