Presentation.PasswordEncryptionFileProperties 屬性 (PowerPoint)

會傳回 Microsoft PowerPoint 是否加密密碼保護之文件的檔案屬性。 唯讀。

語法

expressionPasswordEncryptionFileProperties

表達 代表 Presentation 物件的變數。

傳回值

MsoTriState

註解

若要指定 PowerPoint 以密碼加密文件的演算法使用 SetPasswordEncryptionOptions 方法。

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

另請參閱

Presentation 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應