ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Generating, changing PowerPoint slides from Excel (https://www.excelbanter.com/excel-programming/352899-generating-changing-powerpoint-slides-excel.html)

p. panter

Generating, changing PowerPoint slides from Excel
 
Hello,

I would like to insert a excel table in a existing PowerPoint presentation.
So I have a code and it works fine just if I use blank PowerPoint slides.
How can I change on an existing PowerPoint presentation the existing pages
e.g. 6 and 7 with the new generated PowerPoint slides?

Here are the part of the code that I use:

With PPTApp
.Visible = msoTrue
.Presentations.Add

With .ActivePresentation
.Slides.Add 1, ppLayoutBlank

ActiveSheet.Range("A3:M34").Copy
.Slides(1).Shapes.Paste
With .Slides(1).Shapes(1)
.Top = 100
.Left = 100
End With

.Slides.Add 2, ppLayoutBlank
'.Slides(2).Shapes.Paste

ActiveSheet.Range("A40:M72").Copy
.Slides(2).Shapes.Paste
With .Slides(1).Shapes(1)
.Top = 100
.Left = 100
End With

With .Slides(1).Shapes(1)
.Height = 500
.Width = 600
.Top = 50
.Left = 55
End With

With .Slides(2).Shapes(1)
.Height = 500
.Width = 600
.Top = 50
.Left = 55
End With

Thanks in advance!!




All times are GMT +1. The time now is 12:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com