Saturday, May 30, 2026

VBA Word - Customize Table Width in Microsoft Word

Use the following VBA code to set width of each table in your Microsoft Word document:
Sub TableGridDesignMacro()

   For Each Table In ActiveDocument.Tables
    Table.Style = "Table Grid"	
    Table.PreferredWidthType = wdPreferredWidthPoints
    Table.PreferredWidth = InchesToPoints(6.67)
   Next

End Sub

No comments:

Post a Comment

Hot Topics