Password Property

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

expression.Password

*expression   * Required. An expression that returns one of the objects in the Applies To list.

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

Applies to | Presentation Object