|
Dim ppApp As PowerPoint.Application
Dim prsPres As PowerPoint.Presentation
ppApp = New PowerPoint.Application
prsPres = ppApp.Presentations.Open("C:test.ppt", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse)
'直接prsPres = ppApp.Presentations.Open("C:test.ppt")将不能打开!open方法默认最后的参数WithWindows为True,要设为False才行
ppApp.visible=true
MsgBox(prsPres.TemplateName)
prsPres.Close()
ppApp.Quit()
此时只是显示出PowerPoint的应用程序,并没有打开演示文稿,但 MsgBox(prsPres.TemplateName)的确能返回到正确信息,说明的确打开了C:test.ppt,但不能显示出来,请问是什么回事? |
|