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