How to mass format 50 over tables

J

James Tan79

Hi all,

Probably this was discussed many times, but I can't seem to find it. Please help. I have a 100 pages long report with over 50 tables. However, there is a need to format all the tables such that each is 90% of the page width, the sides are made transparent, and each cell pad with 0.4 pt.

Hope someone can guide with macros etc to automate the process.
 
D

Doug Robbins - Word MVP

Try this:

' Throw Away Macro created by Doug Robbins
'
Dim i As Long, j As Long
j = ActiveDocument.PageSetup.PageWidth -
ActiveDocument.PageSetup.LeftMargin - ActiveDocument.PageSetup.RightMargin
For i = 1 To ActiveDocument.Tables.Count
With ActiveDocument.Tables(i)
.PreferredWidth = j * 0.9
.LeftPadding = 0.4
.RightPadding = 0.4
.Borders.InsideColor = wdColorWhite
.Borders.OutsideColor = wdColorWhite
.Rows.Alignment = wdAlignRowCenter
End With
Next i


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
James Tan79 said:
Hi all,

Probably this was discussed many times, but I can't seem to find it.
Please help. I have a 100 pages long report with over 50 tables. However,
there is a need to format all the tables such that each is 90% of the page
width, the sides are made transparent, and each cell pad with 0.4 pt.
 

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