Class ProtectedViewWindow (PowerPoint VBA)

The class ProtectedViewWindow represents a presentation window that is in protected view.

The main procedures of class ProtectedViewWindow are Activate and Close

Set

To use a ProtectedViewWindow class variable it first needs to be instantiated, for example

Dim pvw as ProtectedViewWindow
Set pvw = ActiveProtectedViewWindow

The following procedures can be used to set variables of type ProtectedViewWindow: Application.ActiveProtectedViewWindow, ProtectedViewWindows.Item, ProtectedViewWindows.Open and Application.ProtectedViewWindows

Themes

Some procedures in this class have been grouped together in themes and are described on separate theme pages

Name with its procedures Caption and SourceName
Format with its procedures Height and Width

Methods

These are the main methods of the ProtectedViewWindow class

Activate - Activates the specified window.

ActiveProtectedViewWindow.Activate

Close - Closes the specified window.

ActiveProtectedViewWindow.Close

Other Methods

ProtectedViewWindows.Open - Open and return a ProtectedViewWindow object from the ProtectedViewWindows collection.

Dim strFileName As String: strFileName = 
Dim pvw As ProtectedViewWindow
Set pvw = ProtectedViewWindows.Open(FileName:=strFileName)

Properties

Active returns whether the specified window is active.

Dim mtsActive As Office.MsoTriState
mtsActive = ActiveProtectedViewWindow.Active

Left returns or sets the distance in points from the left edge of the specified window to the left edge of the application window's client area.

ActiveProtectedViewWindow.Left =

Parent returns the parent object for the specified object. Read-only.

Dim objParent As Object
Set objParent = ActiveProtectedViewWindow.Parent

Presentation returns a Presentation object that represents the presentation in which the specified window was created.

Dim prsPresentation As Presentation
Set prsPresentation = ActiveProtectedViewWindow.Presentation

SourcePath returns the source path of the current ProtectedViewWindow object.

Dim strSourcePath As String
strSourcePath = ActiveProtectedViewWindow.SourcePath

Top returns or sets the distance in points from the top edge of the specified window to the top edge of the application window's client area.

ActiveProtectedViewWindow.Top =

WindowState returns or sets the state of the specified window.

ActiveProtectedViewWindow.WindowState = ppWindowMaximized

ProtectedViewWindows.Count returns the number of objects in the specified collection.

Dim lngCount As Long
lngCount = ProtectedViewWindows.Count

ProtectedViewWindows.Parent returns the parent object for the specified object. Read-only.

Dim objParent As Object
Set objParent = ProtectedViewWindows.Parent