Word.Alignment enum
テキストの水平方向の配置を表します。
注釈
使用元
- Word.リスト: setLevelAlignment
- Word.ListLevel: alignment
- Word.段落:配置
- Word.ParagraphFormat: alignment
- Word.テーブル: alignment、horizontalAlignment
- Word.TableCell: horizontalAlignment
- Word.TableRow: horizontalAlignment
- Word.TableStyle: 配置
例
// 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();
});
フィールド
| centered = "Centered" | 中央への配置。 |
| justified = "Justified" | 完全に両端揃え。 |
| left = "Left" | 左揃え。 |
| mixed = "Mixed" | 混合水平方向の配置。 |
| right = "Right" | 右揃え。 |
| unknown = "Unknown" | アライメントが不明です。 |