Class ProtectedViewWindows (PowerPoint VBA)

The class ProtectedViewWindows represents a collection of ProtectedViewWindow objects. To use a ProtectedViewWindows class variable it first needs to be instantiated, for example


Dim pvws as ProtectedViewWindows
Set pvws = ProtectedViewWindows

Count

Returns the number of objects in the specified collection.


Dim lngCount As Long
lngCount = ProtectedViewWindows.Count

Item

Returns a single ProtectedViewWindow object from the specified ProtectedViewWindows collection.

Item (Index)

Index: The index number of the single ProtectedViewWindow object in the collection to be returned.


Dim pvw As ProtectedViewWindow
Set pvw = ProtectedViewWindows(Index:=1)

Open

Open and return a ProtectedViewWindow object from the ProtectedViewWindows collection.

Open (FileName, ReadPassword, OpenAndRepair)


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

Arguments

The following argument is required

FileName (String) - The name of the file to open.

Optional arguments

The following arguments are optional

ReadPassword (String) - The password to use for the protected file.

OpenAndRepair (Office.MsoTriState) - Indicates whether to repair the file.