Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 554
  • Last Modified:

Set all rows of all tables to at least row height 1.2 cm

Dear Experts:

For all the rows in all the tables in the current document I would like to set the row height to at least 1.2 cm using VBA.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
0
AndreasHermle
Asked:
AndreasHermle
1 Solution
 
Chris BottomleyCommented:
How about:

Sub tableRowHeight()
Dim tbl As Table

    Application.ScreenUpdating = False
    For Each tbl In ActiveDocument.Tables
        tbl.Rows.HeightRule = wdRowHeightAtLeast
        tbl.Rows.Height = CentimetersToPoints(1.2)
    Next
    Application.ScreenUpdating = True

End Sub

Open in new window


Chris
0
 
AndreasHermleAuthor Commented:
Hi Chris,

great, this did the trick. Thank you very much for your professional help. Regards, Andreas
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now