Share via


_Document.Password Property

Sets a password that must be supplied to open the specified document.

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

Syntax

'Declaration
WriteOnly Property Password As String
    Set
'Usage
Dim instance As _Document
Dim value As String

instance.Password = value
string Password { set; }

Property Value

Type: System.String

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.

See Also

Reference

_Document Interface

_Document Members

Microsoft.Office.Interop.Word Namespace