Prev: how to open a password protected powerpoint file by Excel
Next: Data Validation combo box click - 2007
From: wangww on 2 Jun 2010 02:39 how to open a password protected powerpoint file by Excel macro? by the way,the cipher is known.
From: Jacob Skaria on 2 Jun 2010 05:48
Not an expert with PPT; but there is no way to check whether a presentation has got a password or presentations.Open do not have an option to pass the password. Try the below which worked for me....which uses Sendkeys.. Sub Macro() Dim pptApp As Object, strFile As String, strPassWord As String strFile = "d:\Presentation8.ppt" strPassWord = "password" Set pptApp = CreateObject("PowerPoint.Application") pptApp.Visible = True pptApp.Activate SendKeys "%F", True SendKeys "O", True SendKeys strFile, True SendKeys "%O", True SendKeys strPassWord, True SendKeys "~", True 'Set myPPT = pptApp.Presentations(1) 'MsgBox myPPT.Name End Sub -- Jacob (MVP - Excel) "wangww" wrote: > how to open a password protected powerpoint file by Excel macro? by the > way,the cipher is known. |