G
Guest
Hello !!
I'm doing a lot of presentations using my Excel workbook as base.
So, I've written a code to copy each of my sheets, convert them in pictures
and paste in POWERPOINT.
I use the same 1st page in my presentations and the same conception model so
I work with the same powerpoint file as base for all presentations created
from Excel.
That's means the code I need can be created in Powerpoint OR Excel, no
matters as only the End result worth of effort.
My QUESTION :
---> How can I manage to resize every picture to fit Slides Dimension in VBA ?
Please keep in mind pictures contains figures that need to be read so i
whish if it is possible to keep a relation in-between width and height.
Thank you very much to help me !!!
Here is my VBA code I've writen in Excel; but the resizing code can be done
in VBA POWERPOINT, no matters, that's why I'm posting here....
---------------------------------------------
Sub copyinpowerpoint()
Dim pPoint As PowerPoint.Application
Dim dPoint As PowerPoint.Presentation
Set pPoint = New PowerPoint.Application
pPoint.Visible = True
Set dPoint = pPoint.Presentations.Open("D:\my.ppt")
Set Diapo2 = .Slides.Add(Index:=2, Layout:=ppLayoutBlank)
Sheets("sheet1").UsedRange.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Diapo2.Shapes.Paste
I'm doing a lot of presentations using my Excel workbook as base.
So, I've written a code to copy each of my sheets, convert them in pictures
and paste in POWERPOINT.
I use the same 1st page in my presentations and the same conception model so
I work with the same powerpoint file as base for all presentations created
from Excel.
That's means the code I need can be created in Powerpoint OR Excel, no
matters as only the End result worth of effort.
My QUESTION :
---> How can I manage to resize every picture to fit Slides Dimension in VBA ?
Please keep in mind pictures contains figures that need to be read so i
whish if it is possible to keep a relation in-between width and height.
Thank you very much to help me !!!
Here is my VBA code I've writen in Excel; but the resizing code can be done
in VBA POWERPOINT, no matters, that's why I'm posting here....
---------------------------------------------
Sub copyinpowerpoint()
Dim pPoint As PowerPoint.Application
Dim dPoint As PowerPoint.Presentation
Set pPoint = New PowerPoint.Application
pPoint.Visible = True
Set dPoint = pPoint.Presentations.Open("D:\my.ppt")
Set Diapo2 = .Slides.Add(Index:=2, Layout:=ppLayoutBlank)
Sheets("sheet1").UsedRange.CopyPicture Appearance:=xlScreen, Format:=xlPicture
Diapo2.Shapes.Paste