Word.CharacterWidth enum
指定指定范围内文本的字符宽度。
注解
使用方
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/format-range-text-desktop.yaml
// Converts the first paragraph's characters to full width.
await Word.run(async (context) => {
const paragraphRange: Word.Range = context.document.body.paragraphs.getFirst().getRange(Word.RangeLocation.content);
const characterWidth: Word.CharacterWidth = Word.CharacterWidth.full;
paragraphRange.characterWidth = characterWidth;
await context.sync();
console.log("Applied full-width characters.");
});
字段
| full = "Full" | 指定全角字符。 |
| half = "Half" | 指定半角字符。 |