返回或设置指定单元格、列或表格的宽度的首选度量单位。对于 ConditionalStyle 和 TableStyle 对象,为 WdPreferredWidthType,只读。对于“应用于”列表中的所有其他对象,为 WdPreferredWidthType,可读写。
WdPreferredWidthType 可以是下列 WdPreferredWidthType 常量之一: |
wdPreferredWidthAuto |
wdPreferredWidthPercent |
wdPreferredWidthPoints |
expression.PreferredWidthType
expression 必需。该表达式返回以上一个对象。
本示例设置 Microsoft Word 以窗口宽度的百分比来表示宽度,然后将文档的第一个表格的宽度设置为窗口宽度的 50%。
With ActiveDocument.Tables(1)
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 50
End With