[英]Run-Time Error 430 for Power point application in VBA
I want to create powerpoint presentation through VBA Code and I selected library (early binding) reference in tools also. 我想通过VBA代码创建PowerPoint演示文稿,我也选择了工具中的库(早期绑定)参考。 But I'm unable to create Powerpoint application through VBA. 但是我无法通过VBA创建Powerpoint应用程序。 I wrote the below code and i'm getting the error as "Class does not support automation or does not support expected interface" . 我写了下面的代码,并由于“类不支持自动化或不支持预期的接口”而出现错误 。 Could you please help to resolve the issue. 您能否帮助解决问题。
Sub CreatePPT()
Dim MYPPT As PowerPoint.Application
Set MYPPT = New PowerPoint.Application
With MYPPT
.Visible = msoTrue
.Activate
End With
End Sub
You should add a Presentation : 您应该添加一个演示文稿:
Sub CreatePPT()
Dim MYPPT As PowerPoint.Application
Set MYPPT = New PowerPoint.Application
Dim PPTPresent as PowerPoint.Presentation
With MYPPT
.Visible = msoTrue
set PPTPresent = .Presentations.add
End With
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.