Skip to content

Latest commit

 

History

History
74 lines (47 loc) · 2.15 KB

PowerPoint.Presentation.SetPasswordEncryptionOptions.md

File metadata and controls

74 lines (47 loc) · 2.15 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Presentation.SetPasswordEncryptionOptions method (PowerPoint)
vbapp10.chm583079
vbapp10.chm583079
PowerPoint.Presentation.SetPasswordEncryptionOptions
03c07952-784b-eba6-af71-57d3d1414f81
06/08/2017
medium

Presentation.SetPasswordEncryptionOptions method (PowerPoint)

Sets the options Microsoft PowerPoint uses for encrypting presentations with passwords.

Syntax

expression. SetPasswordEncryptionOptions( _PasswordEncryptionProvider_, _PasswordEncryptionAlgorithm_, _PasswordEncryptionKeyLength_, _PasswordEncryptionFileProperties_ )

expression A variable that represents a Presentation object.

Parameters

Name Required/Optional Data type Description
PasswordEncryptionProvider Required String The name of the encryption provider.
PasswordEncryptionAlgorithm Required String The name of the encryption algorithm. PowerPoint supports stream-encrypted algorithms.
PasswordEncryptionKeyLength Required Long The encryption key length. Must be a multiple of 8, starting at 40.
PasswordEncryptionFileProperties Required MsoTriState msoTrue for PowerPoint to encrypt file properties.

Remarks

The PasswordEncryptionFileProperties parameter value can be one of these MsoTriState constants.

msoFalse
msoTrue

Example

This example sets the password encryption options if the file properties are not encrypted for password-protected documents.

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

See also

Presentation Object

[!includeSupport and feedback]