0
votes

Is there a way to change MS Word Table row height property from "Exactly" to "At Least" for all rows while leaving the specified row height value for each row as is.

I work with pre-created Word documents that can contain hundreds of tables with hundreds of rows which have diff row height values specified and all rows are set to "Exactly". This can lead to text wrapping issues where the text wraps below the row and is hidden. I want to change all rows to use At Least but keep the values already specified in order to maintain the minimal row height which seems to solve the text wrapping issue.

Example

Row one:   Specify Height: .14 / Row Height is: Exactly  
Row two:   Specify Height: .16 / Row Height is: Exactly  
Row three: Specify Height: .16 / Row Height is: Exactly  
Row four:  Specify Height: .2  / Row Height is: Exactly  

I need to be able to change "Exactly" to "At Least" across all rows but maintain the specified row height values.

Row one:   Specify Height: .14 / Row Height is: At least  
Row two:   Specify Height: .16 / Row Height is: At least  
Row three: Specify Height: .16 / Row Height is: At least  
Row four:  Specify Height: .2  / Row Height is: At least  

Is there a way to do this through VBA or other?

1

1 Answers

1
votes

Try this:

'Exactly
Tables(1).Rows.HeightRule = wdRowHeightExactly

'At Least
Tables(1).Rows.HeightRule = wdRowHeightAtLeast

'To set the row height:
Tables(1).Rows.Height = CentimetersToPoints(0.5)