是否有方法将所有行的MS Word表格行高属性从"精确"更改为"至少",同时保持每行的指定行高值不变。
我使用的是预先创建的Word文档,这些文档可以包含数百个表,其中数百行指定了不同的行高值,并且所有行都设置为"精确"。这可能会导致文本换行问题,即文本换行在行下方并隐藏。我想将所有行更改为使用"至少",但保留已经指定的值,以保持最小行高,这似乎解决了文本换行问题。
示例
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
我需要能够在所有行中将"精确"更改为"至少",但保持指定的行高值。
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
有没有一种方法可以通过VBA或其他方式来实现这一点?
试试这个:
'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)