PowerPoint.ParagraphHorizontalAlignment enum
表示 PowerPoint.Shape 中 PowerPoint.TextFrame 的水平对齐方式。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Specifies the horizontal and vertical alignments of the cells in a table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a table, specifying horizontal and vertical alignment.
shapes.addTable(3, 4, {
values: [
["A", "BB", "CCC", "DDDD"],
["E", "FF", "GGG", "HHHH"],
["1", "12", "123", "1234"]
],
uniformCellProperties: {
horizontalAlignment: PowerPoint.ParagraphHorizontalAlignment.justify,
verticalAlignment: PowerPoint.TextVerticalAlignment.middle
}
});
await context.sync();
});
字段
center = "Center" | 居中对齐文本。 |
distributed = "Distributed" | 将文本单词分布到整个文本行中。 |
justify = "Justify" | 对齐文本,使其整行对齐。 |
justifyLow = "JustifyLow" | 指定阿拉伯语文本中 kashida 长度的对齐或调整。 |
left = "Left" | 文本与左边距对齐。 |
right = "Right" | 将文本与右边距对齐。 |
thaiDistributed = "ThaiDistributed" | 特别分发泰文文本,因为每个字符都被视为一个单词。 |