Expand Minimize
This topic has not yet been rated - Rate this topic

Presentation.SetPasswordEncryptionOptions Method (PowerPoint)

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

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.

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

msoFalse

msoTrue

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
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.