返回或设置确定指定图文框高度的方法。WdFrameSizeRule,可读写。
WdFrameSizeRule 可以是下列 WdFrameSizeRule 常量之一: |
wdFrameAtLeast |
wdFrameExact |
wdFrameAuto |
expression.HeightRule
expression 必需。该表达式返回一个 Frame 对象。
应用于 Cell、Cells、Row 和 Rows 对象的 HeightRule 属性。
返回或设置确定指定单元格或行高度的方法。WdRowHeightRule,可读写。
WdRowHeightRule 可以是下列 WdRowHeightRule 常量之一: |
wdRowHeightAtLeast |
wdRowHeightExactly |
wdRowHeightAuto |
expression.HeightRule
expression 必需。该表达式返回以上的一个对象。
设置 Cell 或 Cells 对象的 HeightRule 属性,自动设置所在行的该属性。
本示例设置活动文档中第一个图文框的高度和宽度均为 1 英寸。
If ActiveDocument.Frames.Count >= 1 Then
With ActiveDocument.Frames(1)
.HeightRule = wdFrameExact
.Height = InchesToPoints(1)
.WidthRule = wdFrameExact
.Width = InchesToPoints(1)
End With
End If
本示例在新文档中创建一张 3x3 表格,并设置第二行的最小行高为 24 磅。
Set newDoc = Documents.Add
Set myTable = newDoc.Tables.Add(Range:=Selection.Range, _
NumRows:=3, NumColumns:=3)
With myTable.Rows(2)
.Height = 24
.HeightRule = wdRowHeightAtLeast
End With
本示例将确定所选行高度的方法设为按行中最高的单元格自动调整。
If Selection.Information(wdWithInTable) = True Then
Selection.Rows.HeightRule = wdRowHeightAuto
Else
MsgBox "The insertion point is not in a table."
End If