我有一个Excel工作簿,我想使用VBA将sheet1中的表导出到PowerPoint。下面是我的代码,但是我收到了作为平铺显示的错误消息。谁能帮助我解决问题?
谢谢。
Option Explicit
Sub Module1()
Dim ppApp As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
Dim ppSlide As PowerPoint.Slide
Set ppApp = New PowerPoint.Application
ppApp.Visible = True
ppApp.Activate
Set ppPres = ppApp.Presentations.Add
Set ppSlide = ppPres.Slides.Add(1, ppLayoutBlank)
ppSlide.Select
Range("A1").CurrentRegion.Copy
ppSlide.Shapes.Paste
End Sub