I am looking for a way to copy multiple tables from Excel and paste them into a new powerpoint presentation on separate slides.
I currently have the code to copy a range and paste it into a new presentation:
Sub CreateNewPres()
'This Sub simply activates Powerpoint
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, ppLayoutTitle)
'now refer to the shapes within the title slide and input what you want
ppSlide.Shapes(1).TextFrame.TextRange = "End of Pilot Presentation"
ppSlide.Shapes(2).TextFrame.TextRange = "Client Name"
'Add new slide
Set ppSlide = ppPres.Slides.Add(2, ppLayoutBlank)
ppSlide.Select
'this just selects the last slide that you created
'next step is to copy data from excel to the slide that you just created
Range("a1:j32").Copy
ppSlide.Shapes.Paste
ppSlide.Shapes(1).IncrementLeft -100
'can set it to the width of the slide i.e. width = ppPres.PageSetup.SlideWidth
End Sub
Any ideas?
Bookmarks