Reputation: 73
Is there a way how to align a table itself, not it's contents?
I want this:
but not this
I tried the following (code is for Python, but that's almost the same for VBA of C#):
word_table = self._word_app.Selection.Tables(1)
word_table.Range.ParagraphFormat.Alignment = client.constants.wdAlignParagraphCenter
word_table.Range.Paragraphs.Alignment = client.constants.wdAlignParagraphCenter
word_table.Select()
self._word_app.Selection.Range.ParagraphFormat.Alignment = client.constants.wdAlignParagraphCenter
But it only aligns contents. Any idea how to make it work?
Upvotes: 0
Views: 130
Reputation: 7850
word_table.Rows.Alignment = client.constants.wdAlignRowCenter
Upvotes: 1