Partager via


ProtectedViewWindow.Edit Method (Word)

Version Information

Version Added: Word 2010

Syntax

expression .Edit(PasswordTemplate, WritePasswordDocument, WritePasswordTemplate)

expression An expression that returns a ProtectedViewWindow object.

Parameters

Name

Required/Optional

Data Type

Description

PasswordTemplate

Optional

Variant

The password for opening the template.

WritePasswordDocument

Optional

Variant

The password for saving changes to the document.

WritePasswordTemplate

Optional

Variant

The password for saving changes to the template.

Return Value

Document

Remarks

Avoid using hard-coded passwords in your applications. If a password is required in a procedure, request the password from the user, store it in a variable, and then use the variable in your code.

Example

The following code example opens (for editing) the document associated with the active protected view window.

Dim pvDoc As Document 
 
Set pvDoc = ActiveProtectedViewWindow.Edit

See Also

Concepts

ProtectedViewWindow Object

ProtectedViewWindow Object Members