Word.OperationUnit enum
Задает единицу измерения, используемую в операциях Word.
Комментарии
[ Набор API: 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" | Задает единицу слова. |