返回 Microsoft PowerPoint 使用密码加密文档时所用算法的密钥长度。 只读。
语法
expression。 PasswordEncryptionKeyLength
表达 一个代表 Presentation 对象的变量。
返回值
Long
备注
使用 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
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。