WritePassword Property

Applies To

Document object.

Description

Sets a password for saving changes to the specified document. Write-only String.

See Also

HasPassword property, Password property, WriteReserved property.

Example

If the active document isn't already protected against saving changes, this example sets "secret" as the write password for the document.

Set myDoc = ActiveDocument
If myDoc.WriteReserved = False Then myDoc.WritePassword = "secret"