|
-
May 19th, 2004, 07:24 PM
#1
Thread Starter
Junior Member
How to open an existing powerpoint file?
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:
Presentation(unknown member) : Invalid request. The Powerpoint Frame window does not exist.
The debugging line is at
Set ppPresent = ppApp.Presentations.Open(CommonDialog2.FileName, msoCTrue, msoCTrue, msoCTrue)
What is wrong with my code?
-
Dec 9th, 2007, 12:51 AM
#2
New Member
Re: How to open an existing powerpoint file?
please make the application visible before you open presentation in application object
means
ppApp.Visible = msoTrue
Set ppPresent = ppApp.Presentations.Open(CommonDialog2.FileName, msoCTrue, msoCTrue, msoCTrue)
try this
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|