Share via


ProtectedViewWindow.Edit Method

Opens the specified protected view window for editing.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function Edit ( _
    ByRef PasswordTemplate As Object, _
    ByRef WritePasswordDocument As Object, _
    ByRef WritePasswordTemplate As Object _
) As Document
'Usage
Dim instance As ProtectedViewWindow
Dim PasswordTemplate As Object
Dim WritePasswordDocument As Object
Dim WritePasswordTemplate As Object
Dim returnValue As Document

returnValue = instance.Edit(PasswordTemplate, _
    WritePasswordDocument, WritePasswordTemplate)
Document Edit(
    ref Object PasswordTemplate,
    ref Object WritePasswordDocument,
    ref Object WritePasswordTemplate
)

Parameters

  • PasswordTemplate
    Type: System.Object%
    The password for opening the template.
  • WritePasswordDocument
    Type: System.Object%
    The password for saving changes to the document.
  • WritePasswordTemplate
    Type: System.Object%
    The password for saving changes to the template.

Return Value

Type: Microsoft.Office.Interop.Word.Document
A Document object.

Remarks

Avoid using hard-coded passwords in 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 the code.

See Also

Reference

ProtectedViewWindow Interface

ProtectedViewWindow Members

Microsoft.Office.Interop.Word Namespace