ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open password protected ppt files (https://www.excelbanter.com/excel-programming/436856-open-password-protected-ppt-files.html)

BOSS

Open password protected ppt files
 
Dim pptfile As Object
On Error Resume Next
Application.DisplayAlerts = false

Set pptfile = CreateObject("powerpoint.application")
pptfile.Visible = True

Set pshow = pptfile.Presentations.Open(FileItem, Password:="")

With pshow
.Password = "test" ' ppt password
.SaveAs FileItem
.Close
End With
pptfile.Quit
Application.DisplayAlerts = True
End If

How can i pass password from the vba code.
If the file does not have a password then it catches error.
Any help is greatly appreciated.

thx!



All times are GMT +1. The time now is 04:59 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com