![]() |
Excel VBA resize picture in powerpoint
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. My QUESTION : --- How can I manage to resize every picture to fit Slides Dimension ? Thank you very much to help me !!! Here is my VBA code : --------------------------------------------- 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 -- olivier |
Excel VBA resize picture in powerpoint
On Apr 14, 6:50 pm, Olivier B <benardo974(supprimer contenu des
wrote: Hello !! I'm doing a lot of presentations using myExcelworkbook 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 fromExcel. My QUESTION : --- How can I manage to resize every picture to fit Slides Dimension ? Thank you very much to help me !!! Here is my VBA code : --------------------------------------------- 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 -- olivier Hi, I guess you can resize the picture by shaperange.width and length procedure, and specifying your size. Sharad |
All times are GMT +1. The time now is 05:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com