UsableWidth 属性

       

对于 Application 对象:该属性返回 Microsoft Word 文档窗口可设定的最大宽度(以磅为单位)。Long 类型,只读。

对于 Window 对象:该属性返回指定文档窗口中活动工作区的宽度值(以磅为单位)。Long 类型,只读。如果文档窗口中没有可见的工作区,UsableWidth 则返回 1。用 UsableWidth 的值减去 1 即是实际可用的高度。

示例

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

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