Results 1 to 2 of 2

Thread: How to open an existing powerpoint file?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2004
    Posts
    22

    How to open an existing powerpoint file?

    DOes anybody know how to open an existing powerpoint presentation?

    Below are my current codes:
    VB Code:
    1. Private Sub cmdOpenFile_Click()
    2.     CommonDialog2.InitDir = "C:\"
    3.     CommonDialog2.ShowOpen
    4.    
    5.     If CommonDialog2.FileName = "" Then
    6.         MsgBox "No file is opened", vbInformation, "Open File"
    7.     Else
    8.         Set ppApp = New PowerPoint.Application
    9.         Set ppPresent = ppApp.Presentations.Open(CommonDialog2.FileName, msoCTrue, msoCTrue, msoCTrue)
    10.         ppApp.Visible = msoTrue
    11.     End If
    12.    
    13. 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?




  2. #2
    New Member
    Join Date
    Dec 2007
    Posts
    1

    Talking 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
  •  



Click Here to Expand Forum to Full Width