I've been using interop.word in C# and I want to center a table in a document, all the rows are centered but I need the whole table to be centered in my document. I just can't find the property to center the whole table in a document. I've already centered all the rows but I need the table to appear centered in my document.
Select the text that you want to center, and then click Paragraph on the Format menu. On the Indents and Spacing tab, change the setting in the Alignment box to Centered, and then click OK.
Format. Alignment=ParagraphAlignment. Center; and replace it with table.
Hover over the table, then click the square with arrows at the top left of the table. Click the Home tab at the top of the window. Click the Center option in the Paragraph section of the ribbon.
did you try table.Rows.Alignment = Word.WdRowAlignment.wdAlignRowCenter
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With