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...!
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...
> 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:
[quoted text clipped - 3 lines]
> this seems to center-align a right-aligned table but is not working for a
> left-aligned table. I am thoroughly stumped...!
Jonathan West - 15 Oct 2007 16:11 GMT
>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

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Hashish - 16 Oct 2007 07:34 GMT
Hey...thanx a ton. your code solved it. I dont know why that problem occurs
but atleast i managed to work around it..!
> >I think i should add...
> >
[quoted text clipped - 7 lines]
>
> Selection.Tables(1).Rows.WrapAroundText = False