在PPT2003中可以用这样的语句:
    Set Ppt = CreateObject("PowerPoint.Application")
    Set Pst = Ppt.Presentations.Open(FileName, , , 0)
但是在Office2007下,Ppt.Presentations.Open这一句会出错?改用Ppt.Presentations.Open2007也会报错?

解决方案 »

  1.   

    他是动态创建的,不需要引用ppt.Dim a As New PowerPoint.Application
    Dim b As PowerPoint.Presentations
    a.Visible = msoTrue
    Set b = a.Presentations
    Dim c As PowerPoint.Presentation
    Set c = b.Open("C:\阿第三方.ppt")没看见错误.Function Open(FileName As String, [ReadOnly As MsoTriState], [Untitled As MsoTriState], [WithWindow As MsoTriState = msoTrue]) As Presentation
    你指定WithWindow=msoFalse = 0是...
    我也没明白那个值..
      

  2.   

    我试了,在Office2007下编译是没问题的,但是运行时会报错啊?
      

  3.   

    对象'Open'的方法'Presentations'失败
      

  4.   

    对象'Open'的方法'Presentations'失败