View Single Post
 
Old 10-19-2016, 04:30 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2013
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

The following code will do what you asked.
Code:
Sub Macro1()
  Dim aTbl As Table
  For Each aTbl In ActiveDocument.Tables
    'aTbl.PreferredWidthType = wdPreferredWidthPercent
    'aTbl.PreferredWidth = 100
    If aTbl.Columns.Count > 1 Then aTbl.Range.Cells.DistributeWidth
  Next aTbl
End Sub
The two disabled lines could be enabled if you want all the tables to fill the width of the page as well.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote