Skip to main content

IdxRichEditDocument.SetEncryptionPassword(string) Method

Assigns an encryption password to the current document.

Declaration

procedure SetEncryptionPassword(const APassword: string);

Parameters

Name Type Description
APassword string

An encryption password.

If you pass an empty string as this parameter, the procedure removes the current encryption password.

Remarks

Call the SetEncryptionPassword procedure to add or remove password protection for the current document.

Limitations and Considerations

Only the Office OpenXML (DOCX) document format supports encryption. The following dialog appears in response to an attempt to export a document to any other format:

VCL Rich Edit: A Password Protection Loss Confirmation Dialog

See Also