共用方式為


Word) (Application.UsableHeight 屬性

會傳回指出您可以設定 Microsoft Word 文件視窗高度的最大高度 (以點為單位)。 唯讀的 Long

語法

運算式UsableHeight

expression 代表 Application 物件的變數。

範例

此範例會將使用中文件視窗的大小設為最大允許螢幕區域的 1/4。

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 支援與意見反應