Center-Align a table

H

Hashish

I need to center align some tables. I am using a macro in which I go to the
table using a bookmark and then do:

Selection.Tables(1).Rows.Alignment = wdAlignRowCenter

this seems to center-align a right-aligned table but is not working for a
left-aligned table. I am thoroughly stumped...!
 
H

Hashish

I think i should add...

this problem occurs if the tables have 'text wrapping' selected as 'Around'
in 'Table Properties'. if 'text wrapping' is selected as 'none' then no
problem occurs...
 
J

Jonathan West

Hashish said:
I think i should add...

this problem occurs if the tables have 'text wrapping' selected as
'Around'
in 'Table Properties'. if 'text wrapping' is selected as 'none' then no
problem occurs...

In that case, it would appear that you first set the wrapping to none.
precede your line of code with this

Selection.Tables(1).Rows.WrapAroundText = False
 
H

Hashish

Hey...thanx a ton. your code solved it. I dont know why that problem occurs
but atleast i managed to work around it..!
 
Top