Private oPpt As PowerPoint.Application
Private ppt As PowerPoint.PresentationSet oPpt = CreateObject("PowerPoint.Application")Set ppt = oPpt.Presentations.Open("c:\a.ppt")怎么运行到最后一句Set ppt = oPpt.Presentations.Open("c:\a.ppt")抱错啊
错误代码:
Run_time error '-2147188160(80048240)'
Presentation(unknown member):Invalid request.The PowerPoint
Frame window does not exist.我用类似的方法打开word,excel没有问题,请问该如何打开ppt文档呢?
Private ppt As PowerPoint.PresentationSet oPpt = CreateObject("PowerPoint.Application")Set ppt = oPpt.Presentations.Open("c:\a.ppt")怎么运行到最后一句Set ppt = oPpt.Presentations.Open("c:\a.ppt")抱错啊
错误代码:
Run_time error '-2147188160(80048240)'
Presentation(unknown member):Invalid request.The PowerPoint
Frame window does not exist.我用类似的方法打开word,excel没有问题,请问该如何打开ppt文档呢?
Dim strPowerPointFile As String
Dim pptobj As PowerPoint.Application
Set pptobj = New PowerPoint.Application
pptobj.Visible = True
strPowerPointFile = "c:\a.ppt"
pptobj.Presentations.Open(strPowerPointFile)
'......
Set pptobj = New PowerPoint.Application
pptobj.Visible = True Set pptobj = New PowerPoint.Application
pptobj.Visible = True Dim ppt As PowerPoint.Presentation
Set ppt = oPpt.Presentations.Open("c:\a.ppt")
' Close PowerPoint
pptobj.Quit
Set pptobj = Nothing