Application.UsableWidth 属性 (Word)

返回 Microsoft Word 文档窗口可设置的最大宽度(以磅为单位)。 只读 Long

语法

表达式UsableWidth

expression:表示 Application 对象的变量。

示例

本示例将活动文档窗口的尺寸设置为屏幕最大区域的四分之一。

With ActiveDocument.ActiveWindow 
 .WindowState = wdWindowStateNormal 
 .Top = 5 
 .Left = 5 
 .Height = (Application.UsableHeight*0.5) 
 .Width = (Application.UsableWidth*0.5) 
End With

本示例显示活动文档窗口中工作区的大小。

With ActiveDocument.ActiveWindow 
 MsgBox "Working area height = " _ 
 & .UsableHeight & vbLf _ 
 & "Working area width = " _ 
 & .UsableWidth 
End With

另请参阅

Application 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。