Edit

Word.CharacterWidth enum

Specifies the character width of the text in the specified range.

Remarks

API set: WordApiDesktop 1.3

Used by

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/28-formatting/apply-character-layout-desktop.yaml

// Converts the first paragraph's Latin characters and digits 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("Converted the first paragraph's Latin characters and digits to full width.");
});

Fields

full = "Full"

Specifies full-width characters.

half = "Half"

Specifies half-width characters.