Edit

Word.HorizontalInVerticalType enum

Specifies the format for horizontal text set within vertical text.

Remarks

API set: WordApiDesktop 1.4

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

// Keeps the first paragraph's characters horizontal within vertical text.
await Word.run(async (context) => {
    const paragraphRange: Word.Range = context.document.body.paragraphs.getFirst().getRange(Word.RangeLocation.content);
    const horizontalLayout: Word.HorizontalInVerticalType = Word.HorizontalInVerticalType.fitInLine;
    paragraphRange.horizontalInVertical = horizontalLayout;
    await context.sync();
    console.log("Enabled horizontal-in-vertical layout on the first paragraph. Get layout settings to verify it.");
});

Fields

fitInLine = "FitInLine"

The horizontal text is sized to fit in the line of vertical text.

none = "None"

No formatting is applied to the horizontal text.

resizeLine = "ResizeLine"

The line of vertical text is sized to accommodate the horizontal text.