View Single Post
 
Old 03-05-2020, 06:41 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Yes. However, there is a lot of things to consider when changing column widths. What do you want to happen to the overall table and the other associated columns. Here I set the table to the full width of the document (margin to margin) and adjust the other associated column widths proportionally as column 1 width is set to 36 points and column 2 to 72 points.


Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oTbl As Table
For Each oTbl In ActiveDocument.Tables
With oTbl
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 100
.Columns(1).SetWidth 36, wdAdjustProportional
.Columns(2).SetWidth 72, wdAdjustProportional
End With
Next oTbl
lbl_Exit:
Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote