PowerPoint) (DocumentWindow 物件

代表文件視窗。 DocumentWindow 物件是 DocumentWindows 成員 集合。 DocumentWindows 集合包含所有開啟的文件視窗。

註解

使用 簡報 若要傳回目前執行指定的文件視窗中的簡報的屬性。

使用 選取項目 若要傳回選取範圍的屬性。

使用 SplitHorizontal 可以傳回大綱窗格佔的螢幕寬度百分比標準模式中的屬性。

使用 SplitVertical 若要傳回在標準模式中的投影片窗格佔的螢幕高度百分比的屬性。

使用 [ 檢視 ] 傳回指定的文件視窗中檢視的屬性。

範例

使用 Windows (索引) ,其中 index 是文件視窗索引號碼,以傳回單一 DocumentWindow 物件。 下列範例會在第二個文件視窗。

Windows(2).Activate

DocumentWindows 集合 Windows(1)、 的第一個成員一定會傳回使用中文件視窗。 或者,您可以使用 ActiveWindow 若要傳回使用中文件視窗的屬性。 下列範例會將使用中視窗最大化。

ActiveWindow.WindowState = ppWindowMaximized

使用 窗格 (索引) ,其中 index 是窗格索引號碼,以在文件視窗的標準、投影片、大綱或備忘稿頁面檢視中操作窗格。 下列範例會啟動窗格三,這是備忘稿窗格。

ActiveWindow.Panes(3).Activate

使用 ActivePane 若要傳回使用中的窗格內文件視窗的屬性。 下列範例會檢查使用中窗格是否大綱窗格。 如果不是,它會啟動大綱窗格。

mypane = ActiveWindow.ActivePane.ViewType

    If mypane <> 1 Then

        ActiveWindow.Panes(1).Activate

    End If

方法

名稱
Activate
關閉
ExpandSection
FitToPage
IsSectionExpanded
LargeScroll
NewWindow
PointsToScreenPixelsX
PointsToScreenPixelsY
RangeFromPoint
ScrollIntoView
SmallScroll

屬性

名稱
Active
ActivePane
應用程式
BlackAndWhite
Caption
高度
左
Panes
Parent
Presentation
Selection
SplitHorizontal
SplitVertical
上方
View
ViewType
寬度
WindowState

另請參閱

PowerPoint 物件模型參考資料

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。