DOes anybody know how to open an existing powerpoint presentation?
Below are my current codes:
VB Code:
Private Sub cmdOpenFile_Click() CommonDialog2.InitDir = "C:\" CommonDialog2.ShowOpen If CommonDialog2.FileName = "" Then MsgBox "No file is opened", vbInformation, "Open File" Else Set ppApp = New PowerPoint.Application Set ppPresent = ppApp.Presentations.Open(CommonDialog2.FileName, msoCTrue, msoCTrue, msoCTrue) ppApp.Visible = msoTrue End If End Sub
I get an error of:
The debugging line is atPresentation(unknown member) : Invalid request. The Powerpoint Frame window does not exist.
What is wrong with my code?Set ppPresent = ppApp.Presentations.Open(CommonDialog2.FileName, msoCTrue, msoCTrue, msoCTrue)
![]()
![]()
![]()




Reply With Quote