首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

请教哪位高手知道如何在VB程序中打开PPT2007的文档

2012-11-04 
请问谁知道怎么在VB程序中打开PPT2007的文档?在PPT2003中可以用这样的语句:Set Ppt CreateObject(Power

请问谁知道怎么在VB程序中打开PPT2007的文档?
在PPT2003中可以用这样的语句:
  Set Ppt = CreateObject("PowerPoint.Application")
  Set Pst = Ppt.Presentations.Open(FileName, , , 0)
但是在Office2007下,Ppt.Presentations.Open这一句会出错?改用Ppt.Presentations.Open2007也会报错?

[解决办法]
是不是没有添加引用?工程-》引用-》。。。
[解决办法]
他是动态创建的,不需要引用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是...
我也没明白那个值..

热点排行