Word.HorizontalInVerticalType enum
指定竖排文本中设置的横排文本的格式。
注解
使用方
示例
// 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" | 根据横向文字调整竖排文字行。 |