title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Presentation.Password property (PowerPoint) |
vbapp10.chm583080 |
|
|
977876b7-b40f-de45-c259-e91744915085 |
08/02/2022 |
medium |
Returns or sets the password that must be supplied to open the specified presentation. Read/write.
expression. Password
expression A variable that represents a Presentation object.
String
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.
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
[!includeSupport and feedback]