I want to open a PowerPoint Presentation that has a write password, directly with VBA without showing the dialog box, which asks to enter the password or open as Read-Only.
I can do this in a Word document with the following code:
Sub openWriteProtectedWord() Documents.Open FileName:="C:UsersuserDesktopDoc2.docx", ReadOnly:=True End Sub
When this is executed the file opens automatically without showing the pop-up where I have to click Read-Only button.
The code for PowerPoint:
Sub openWriteProtected() Presentations.Open FileName:="C:UsersuserDesktoptest.pptx", ReadOnly:=msoTrue End Sub
When the code is executed the pop-up dialog shows up to enter password or open as read-only.
Is this a missing feature for PowerPoint, or it is done in another way?