EncryptionProvider.Save Method
Saves an encrypted document.
Namespace: Microsoft.Office.Core
Assembly: office (in office.dll)
Syntax
'Declaration
Function Save ( _
SessionHandle As Integer, _
EncryptionData As Object _
) As Integer
'Usage
Dim instance As EncryptionProvider
Dim SessionHandle As Integer
Dim EncryptionData As Object
Dim returnValue As Integer
returnValue = instance.Save(SessionHandle, _
EncryptionData)
int Save(
int SessionHandle,
Object EncryptionData
)
Parameters
SessionHandle
Type: System.Int32The ID of the current session.
EncryptionData
Type: System.ObjectContains the encryption information.
Return Value
Type: System.Int32
Integer
Remarks
When you save a file to the Office Open XML File Format (which is the only format that supports custom file encryption), then 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, then Microsoft Office will save the document without encryption. This allows documents to be exported to formats that do not support encryption or rights management.