Muokkaa

Jaa


Presentation.Password property (PowerPoint)

Returns or sets the password that must be supplied to open the specified presentation. Read/write.

Syntax

expression. Password

expression A variable that represents a Presentation object.

Return value

String

Remarks

If the presentation is not fully downloaded, the setting of this property fails and an error occurs. For more information about the Partial Documents, see Work with Partial Documents.

Example

This example opens Earnings.ppt, sets a password for it, and then closes the presentation.

Sub SetPassword()

    With Presentations.Open(FileName:="C:\My Documents\Earnings.ppt")

        .Password = complexstrPWD 'global variable

        .Save

        .Close

    End With

End Sub

See also

Presentation Object

Work with Partial Documents

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.