Macro question for tables

B

Bob M.

I want to make a macro that will go through an entire document and center
every table it finds to the page. I can make one that does one at a time but
is there a way to do them all at once?
 
J

Jezebel

Dim pTable as Word.Table

For each pTable in ActiveDocument.Tables
pTable.Rows.Alignment = wdAlignRowCenter
Next
 
B

Bob M.

FANTASTIC! Works perfect. Thank you Jezebel!!!

Jezebel said:
Dim pTable as Word.Table

For each pTable in ActiveDocument.Tables
pTable.Rows.Alignment = wdAlignRowCenter
Next
 

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