| Junior Member with 2 posts. THREAD STARTER | | Join Date: Dec 2011 Experience: Intermediate | |
From what I’ve seen, Word 2003 doesn’t let you iterate through columns like you would in Word 2007. So, when writing this as a 2003 macro, you have to brute force it. This has worked for me (this assumes that you have already set the table width to the sum of all of these columns): Dim t As Table For Each t In ActiveDocument.Tables t.Cell(1, 1).Select Selection.Expand Unit:=wdColumn Selection.Columns.PreferredWidthType = wdPreferredWidthPoints Selection.Columns.PreferredWidth = InchesToPoints(0.73) Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Expand Unit:=wdColumn Selection.Columns.PreferredWidthType = wdPreferredWidthPoints Selection.Columns.PreferredWidth = InchesToPoints(0.35) Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Expand Unit:=wdColumn Selection.Columns.PreferredWidthType = wdPreferredWidthPoints Selection.Columns.PreferredWidth = InchesToPoints(0.66) Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Expand Unit:=wdColumn Selection.Columns.PreferredWidthType = wdPreferredWidthPoints Selection.Columns.PreferredWidth = InchesToPoints(0.51) Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Expand Unit:=wdColumn Selection.Columns.PreferredWidthType = wdPreferredWidthPoints Selection.Columns.PreferredWidth = InchesToPoints(0.38) Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.Expand Unit:=wdColumn Selection.Columns.PreferredWidthType = wdPreferredWidthPoints Selection.Columns.PreferredWidth = InchesToPoints(7.56) Selection.MoveRight Unit:=wdCharacter, Count:=1 Next t |