ProtectedViewWindow Object (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents a protected view window.

Documents displayed in a protected view window cannot be edited and are restricted from running active content such as Visual Basic for Applications macros and Data Connections.

Use ProtectedViewWindows(Index), where Index is the index number to return a single ProtectedViewWindow object.

The index number represents the position of the protected view window in the ProtectedViewWindows collection.. The following code example returns the first protected view window.

Dim pvWindow As ProtectedViewWindow 
Set pvWindow = ProtectedViewWindows(1)