title: PowerPoint VBA - loop all slides, all shapes, find chart, set datalabel color to Black
body: <p>I'm new to PowerPoint VBA so please bear with me.</p>
  
  <p>I would like to:</p>
  
  <ol>
  <li>loop through all the slides on a given pptx, </li>
  <li>loop through all the shapes on a given slide, </li>
  <li>find chart shapes</li>
  <li>loop through the chart's series collection</li>
  <li>set the datalabel color property to dark black.</li>
  </ol>
  
  <p>So far I have been able to complete the first 3 tasks but I need help with the last 2. Here is my code:</p>
  
  <pre><code>Sub test()
  
    Dim slide As Object
    Dim shape As Object
    Dim shapeNames As Object
    Dim chSeries As Series
  
    i = 0
    For Each slide In ActivePresentation.Slides
  
        For Each shape In slide.Shapes
  
            If shape.HasChart Then
  
                i = i + 1
                Debug.Print "found a chart on slide", i
  
            End If
  
        Next
  
    Next
  
  End Sub
  </code></pre>