會傳回 Microsoft PowerPoint 在以密碼加密文件時,所使用之演算法的金鑰長度。 唯讀。
語法
expression。 PasswordEncryptionKeyLength
詞 一個代表 Presentation 物件的變數。
傳回值
Long
註解
若要指定 PowerPoint 以密碼加密文件的演算法使用 SetPasswordEncryptionOptions 方法。
範例
如果密碼金鑰長度少於 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 支援與意見反應。