I need to right justify the text in the 2nd thru last columns all but 2 tables in a document. How would I do that with a macro? There are 9 tables, but I want to skip tables 7 and 8.
Tables have the Columns proberty and are members of the Tables collection. You can refer to them by item number: thisdocument.Tables(i), where i = 1-6, 9.
Then, for each of those, you can refer to the columns: thisdocument.Tables(i).Columns(j) where j = 2-thisdocument.Tables(i).Columns.Count.
I don't think you can set the Alignment property of a column, only of a row, so you'll have to refer to each cell in the column. That is, for a given column, it has a Cells property which in returns a Cells collection: for each c in thisdocument.Tables(i).Columns(j).Cells
...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.