Word.SelectionNextOptions interface
Stellt die Optionen für die Selection.next-Methode dar.
Hinweise
[ API-Satz: WordApiDesktop 1.4 ]
Beispiele
// 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}"`);
});
Eigenschaften
| count | Wenn angegeben, gibt die Anzahl der Einheiten an, um die Sie fortfahren möchten. Der Standardwert ist 1. |
| unit | Gibt bei Angabe den Typ der Einheiten an, um die Auswahl verschoben werden soll. Der Standardwert ist |
Details zur Eigenschaft
count
Wenn angegeben, gibt die Anzahl der Einheiten an, um die Sie fortfahren möchten. Der Standardwert ist 1.
count?: number;
Eigenschaftswert
number
Hinweise
unit
Gibt bei Angabe den Typ der Einheiten an, um die Auswahl verschoben werden soll. Der Standardwert ist character.
unit?: Word.OperationUnit | "Character" | "Word" | "Sentence" | "Paragraph" | "Line" | "Story" | "Screen" | "Section" | "Column" | "Row" | "Window" | "Cell" | "CharacterFormat" | "ParagraphFormat" | "Table" | "Item";
Eigenschaftswert
Word.OperationUnit | "Character" | "Word" | "Sentence" | "Paragraph" | "Line" | "Story" | "Screen" | "Section" | "Column" | "Row" | "Window" | "Cell" | "CharacterFormat" | "ParagraphFormat" | "Table" | "Item"