PasswordEncryptionKeyLength 属性

       

返回 Long 类型值,该值表示 Microsoft PowerPoint 通过密码加密文档时所使用算法的密钥长度。只读。

expression.PasswordEncryptionKeyLength

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

说明

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

示例

本示例中,如果密码加密密钥的长度小于 40,将设置密码加密选项。

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