Word.Alignment enum
Représente l’alignement horizontal du texte.
Remarques
Utilisateur
- Word. Liste : setLevelAlignment
- Word. ListLevel : alignement
- Word. Paragraphe : alignement
- Word. ParagraphFormat : alignement
- Word. Table : alignement, horizontalAlignment
- Word. TableCell : horizontalAlignment
- Word. TableRow : horizontalAlignment
- Word. TableStyle : alignement
Exemples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/paragraph-properties.yaml
// Centers the last paragraph between the document margins.
await Word.run(async (context) => {
const lastParagraph: Word.Paragraph = context.document.body.paragraphs.getLast();
const alignment: Word.Alignment = Word.Alignment.centered;
lastParagraph.alignment = alignment;
await context.sync();
});
Champs
| centered = "Centered" | Alignement au centre. |
| justified = "Justified" | Alignement pleinement justifié. |
| left = "Left" | Alignement à gauche. |
| mixed = "Mixed" | Alignement horizontal mixte. |
| right = "Right" | Alignement à droite. |
| unknown = "Unknown" | Alignement inconnu. |