Skip to content

Files

Latest commit

 

History

History
65 lines (35 loc) · 1.32 KB

PowerPoint.Presentation.Password.md

File metadata and controls

65 lines (35 loc) · 1.32 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Presentation.Password property (PowerPoint)
vbapp10.chm583080
vbapp10.chm583080
PowerPoint.Presentation.Password
977876b7-b40f-de45-c259-e91744915085
08/02/2022
medium

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

[!includeSupport and feedback]