Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to open a password protected powerpoint file by Excel macro

how to open a password protected powerpoint file by Excel macro? by the
way,the cipher is known.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default How to open a password protected powerpoint file by Excel macro

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default How to open a password protected powerpoint file by Excel mac

If that works; you can combine all Sendkeys as below

SendKeys "%FO" & strFile & "%O" & strPassWord & "~", True

--
Jacob (MVP - Excel)


"Jacob Skaria" wrote:

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open a password protected powerpoint file by Excel juwen Excel Programming 0 June 2nd 10 07:33 AM
How to open an Excel password protected file? Néstor Sánchez A. Excel Programming 0 January 8th 09 02:04 PM
Cannot open password-protected Excel File Sumit Excel Discussion (Misc queries) 0 March 6th 08 09:41 AM
Excel Macro to open password protected workbooks? DBM[_2_] Excel Discussion (Misc queries) 3 March 30th 07 04:48 PM
Open excel file from password protected Intranet site(IE) Dan McCollick Excel Programming 4 May 17th 06 07:37 PM


All times are GMT +1. The time now is 05:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"