全部显示

PasswordEncryptionFileProperties 属性

       

如果 Microsoft PowerPoint 对密码保护的文档的文件属性进行加密,则返回 MsoTrue 属性值。只读。MsoTriState 类型。

expression.PasswordEncryptionFileProperties

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

说明

使用 SetPasswordEncryptionOptions 方法以指定 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