martinctc
11/1/2017 - 3:35 PM

Resize and reposition all charts within Presentation [PowerPoint VBA]

[Resize All Charts] Resize and reposition all charts within Presentation #PowerPoint VBA

Sub AllChartsResize()

Dim sld As Slide
Dim shp As Shape
Dim sr As Series
Dim chrt As Chart
Dim i, j, k, m As Long

'r converts cm to points
r = 28.3464567

    For Each sld In ActivePresentation.Slides
        For Each shp In sld.Shapes
            If shp.HasChart Then
                shp.Height = 10.8 * r
                shp.Width = 22.86 * r
                shp.Left = 1.27 * r
                shp.Top = 5.45 * r
            End If
            
             'If shp.HasChart Then
             '   shp.Chart.HasAxis(xlValue) = False
             '   shp.Chart.HasAxis(xlCategory) = False
             'End If
    Next shp
    Next sld

End Sub