EncryptionProvider.Save method (Office)
Saves an encrypted document.
Syntax
expression.Save(SessionHandle, EncryptionData)
expression An expression that returns an EncryptionProvider object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
SessionHandle | Required | Long | The ID of the current session. |
EncryptionData | Required | IUnknown | Contains the encryption information. |
Return value
Long
Remarks
When you save a file to the Office Open XML File format (which is the only format that supports custom file encryption), the provider is called by your COM add-in to encrypt the document. If you attempt to save to a format that does not support custom file encryption and you have the appropriate rights to do so, Microsoft Office will save the document without encryption. This allows documents to be exported to formats that don't support encryption or rights management.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.