Far more efficient:
Code:
Sub Test2()
Application.ScreenUpdating = False
Dim Tbl As Table
Const text_a As String = "A text"
Const text_b As String = "A longer text to make the column need more width"
Const text_c As String = "More text"
Set Tbl = ActiveDocument.Tables.Add(Range:=Selection.Range, NumRows:=1, NumColumns:=3, _
DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:=False)
With Tbl
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
.AllowAutoFit = False
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(17.5)
.LeftPadding = 0
.RightPadding = 0
With .Cell(1, 1)
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(3.2)
.Range.Text = text_a
End With
With .Cell(1, 2)
.PreferredWidthType = wdPreferredWidthPoints
.PreferredWidth = CentimetersToPoints(13.4)
.Range.Text = text_b
End With
.Cell(1, 3).Range.Text = text_c
End With
Application.ScreenUpdating = True
Application.ScreenRefresh
MsgBox ("OK")
End Sub
Note: One wouldn't ordinarily bother with Application.ScreenRefresh, but you seem concerned to show the table in its final form before the message-box displays.