我正在寻找一个简单的VBA代码,它将执行以下操作:
->打开特定的PowerPoint演示文稿(模板)
->选择一个特定的幻灯片然后复制它
现在我有这个
Sub pres()
Set PowerPointApp = CreateObject("PowerPoint.Application")
PowerPointApp.Presentations.Open "C:\Users\myname\Desktop\test.pptx"
PowerPointApp.Visible = True
ActivePresentation.Slides(8).Duplicate
End Sub
打开演示文稿但不执行任何操作,并向我返回错误429。
有人对如何完成这个非常简单的任务有任何想法吗?
谢谢
[Presentations.Open
返回您应捕获的Presentation
对象,如下所示: