Presentation.PasswordEncryptionFileProperties 属性 (PowerPoint)

返回一个值,该值指示 Microsoft PowerPoint 是否对使用密码保护的文档的文件属性进行加密。 只读。

语法

expressionPasswordEncryptionFileProperties

表达 一个代表 Presentation 对象的变量。

返回值

MsoTriState

备注

使用 SetPasswordEncryptionOptions 方法来指定 PowerPoint 在用密码对文档加密时使用的算法。

PasswordEncryptionFileProperties 属性的值可以是其中一个 MsoTriState 常量。

常量 说明
msoFalse PowerPoint 对密码保护的文档的文件属性不进行加密。
msoTrue PowerPoint 对密码保护的文档的文件属性进行加密。

示例

如果未对密码保护的文档的文件属性加密,本示例将设置密码加密选项。

Sub PasswordSettings()

    With ActivePresentation
        If .PasswordEncryptionFileProperties = msoFalse Then
            .SetPasswordEncryptionOptions _
                PasswordEncryptionProvider:="Microsoft RSA SChannel Cryptographic Provider", _
                PasswordEncryptionAlgorithm:="RC4", _
                PasswordEncryptionKeyLength:=56, _
                PasswordEncryptionFileProperties:=True
        End If
    End With

End Sub

另请参阅

演示文稿对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。