Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
PowerPoint.ParagraphHorizontalAlignment enum
- Package:
- powerpoint
Represents the horizontal alignment of the PowerPoint.TextFrame in a PowerPoint.Shape.
Remarks
Used by
- PowerPoint.ParagraphFormat: horizontalAlignment
- PowerPoint.TableCell: horizontalAlignment
- PowerPoint.TableCellProperties: horizontalAlignment
Examples
// 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();
});
Fields
| center = "Center" | Align text in the center. |
| distributed = "Distributed" | Distributes the text words across an entire text line. |
| justify = "Justify" | Align text so that it's justified across the whole line. |
| justifyLow = "JustifyLow" | Specifies the alignment or adjustment of kashida length in Arabic text. |
| left = "Left" | Align text to the left margin. |
| right = "Right" | Align text to the right margin. |
| thaiDistributed = "ThaiDistributed" | Distributes Thai text specially, because each character is treated as a word. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
