Macro to center tables?

B

Bob M.

I am working on a 275 page document that has 1 table per page. I want to
make a macro that finds every table in the document and centers it on it's
page. Is this possible?
 
H

Helmut Weber

Hi Bob,
in principle like this, but only for
horizontal centering:
Dim oTbl As Table
For Each oTbl In ActiveDocument.Tables
oTbl.Rows.Alignment = wdAlignRowCenter
Next
 
C

Chris

Center a table by centering the ROWS.... it never occurred to me! I spent
hours playing with table.range.paragraphFormat.alignment and more obscure
attempts. Thanks!

Documentation for the Word object model seems sparse...anyone find a more
thorough source online than msdn?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top