ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel to Power Point slides (https://www.excelbanter.com/excel-programming/353308-excel-power-point-slides.html)

p. panter

Excel to Power Point slides
 
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!!



Ron de Bruin

Excel to Power Point slides
 
Hi p. panter

See this site for possible answer
http://peltiertech.com/Excel/XL_PPT.html

For example
http://peltiertech.com/Excel/XL_PPT.html#rangeppt



--
Regards Ron de Bruin
http://www.rondebruin.nl


"p. panter" wrote in message ...
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 11:15 PM.

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