Word.CharacterWidth enum

指定した範囲内のテキストの文字幅を指定します。

注釈

API セット: WordApiDesktop 1.3

使用元

例

// 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"

半角文字を指定します。