Word.OperationUnit enum
Word操作で使用される測定単位を指定します。
注釈
[ API set: WordApiDesktop 1.4 ]
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/55-selection/get-previous-next-range.yaml
// Gets the range of the next word relative to the current selection.
await Word.run(async (context) => {
const options: Word.SelectionNextOptions = {
unit: Word.OperationUnit.word,
count: 1,
};
const nextRange: Word.Range = context.document.selection.getNextRange(options);
nextRange.load("text");
await context.sync();
console.log(`Next word: "${nextRange.text}"`);
});
フィールド
| cell = "Cell" | セルの単位を指定します。 |
| character = "Character" | 文字単位を指定します。 |
| characterFormat = "CharacterFormat" | 文字書式単位を指定します。 |
| column = "Column" | 列単位を指定します。 |
| item = "Item" | 項目単位を指定します。 |
| line = "Line" | 線の単位を指定します。 |
| paragraph = "Paragraph" | 段落単位を指定します。 |
| paragraphFormat = "ParagraphFormat" | 段落書式の単位を指定します。 |
| row = "Row" | 行単位を指定します。 |
| screen = "Screen" | 画面単位を指定します。 |
| section = "Section" | セクション単位を指定します。 |
| sentence = "Sentence" | 文単位を指定します。 |
| story = "Story" | ストーリー単位を指定します。 |
| table = "Table" | テーブル単位を指定します。 |
| window = "Window" | ウィンドウ単位を指定します。 |
| word = "Word" | 単語単位を指定します。 |