PasswordEncryptionProvider 属性

       

返回 String 类型值,该值指定 Microsoft PowerPoint 通过密码加密文档时所使用加密算法的供应商名称。只读。

expression.PasswordEncryptionProvider

expression  必选。该表达式返回“应用于”列表中的对象之一。

说明

使用 SetPasswordEncryptionOptions 方法以指定 PowerPoint 通过密码加密文档所使用的算法。

示例

本示例中,如果使用的密码加密算法不是 Microsoft RSA SChannel Cryptographic Provider,将设置密码加密选项。

Sub PasswordSettings()
    With ActivePresentation
        If .PasswordEncryptionProvider <> "Microsoft RSA SChannel Cryptographic Provider" Then
            .SetPasswordEncryptionOptions _
                PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _
                PasswordEncryptionAlgorithm:="RC4", _
                PasswordEncryptionKeyLength:=56, _
                PasswordEncryptionFileProperties:=True
        End If
    End With
End Sub