Hi everyone.
Pls kindly support me.
I want to resize the chart which copied from excel to PPT file.
I have copied it from excel into the PPT successfully and now I want to edit size.
The code as below. How to change this size chart ?
Thanks in advance.
Dim Sh
Dim PP As PowerPoint.Application
Dim PPpres As PowerPoint.Presentation
Dim lngSlideNumbers(3) As Long
Dim lngChartNumbers(3) As Long
Dim lngIndex As Long
Dim myslide As PowerPoint.Slide
lngSlideNumbers(1) = 2
lngSlideNumbers(2) = 10
lngSlideNumbers(3) = 12
lngChartNumbers(1) = 3
lngChartNumbers(2) = 5
lngChartNumbers(3) = 20
'Create a PP application and make it visible
Set PP = New PowerPoint.Application
PP.Visible = msoCTrue
'Open the presentation you wish to copy to
Set PPpres = PP.Presentations.Open("C:\Users\Administrator\Desktop\Chart for PM\Line\2019.04.02-Vietnam market analysis (GFK).pptx")
'For lngIndex = 1 To 3
'Set the shape you want to copy
Set Sh = Application.Worksheets("Make Chart").ChartObjects("Chart 18")
'Copy the shape
Sh.CopyPicture Appearance:=xlScreen, Format:=xlPicture
'And paste it on the sixth slide
PPpres.Slides(lngSlideNumbers(1)).Shapes.Paste
Bookmarks