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?

Re: Macro to center tables? by Helmut

Helmut
Tue Oct 26 02:25:10 CDT 2004

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
---
Gruss
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000

Re: Macro to center tables? by BobM

BobM
Tue Oct 26 10:37:13 CDT 2004

Thanks Helmut! It works perfect. HUGE time saver.

"Helmut Weber" wrote:

> 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
> ---
> Gruss
> Helmut Weber, MVP
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
>

Re: Macro to center tables? by Chris

Chris
Thu Oct 28 15:39:05 CDT 2004

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?


"Helmut Weber" wrote:

> 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
> ---
> Gruss
> Helmut Weber, MVP
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
>