Word.HorizontalInVerticalType enum

縦書きテキスト内に横書きテキストを設定するときの書式を指定します。

注釈

API セット: WordApiDesktop 1.4

使用元

例

// 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.");
});

フィールド

fitInLine = "FitInLine"

横書き文字列のサイズが、縦書きの行に合わせて変更されます。

none = "None"

横書き文字列に書式を適用しません。

resizeLine = "ResizeLine"

縦書きの行のサイズが、横書き文字列に合わせて変更されます。