Word.HorizontalInVerticalType enum

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

注釈

API セット: WordApiDesktop 1.4

使用元

例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/35-ranges/format-range-text-desktop.yaml

// Keeps the first paragraph's characters horizontal when the document uses 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 text within vertical text. Get formatting to verify the setting.");
});

フィールド

fitInLine = "FitInLine"

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

none = "None"

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

resizeLine = "ResizeLine"

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