I am trying to check for red fonts in a powerpoint slide. I want to store the slide number that contain the red font in the array and display in a single dialog box. Currently it displays one slide number in one dialog box.
My current code looks like the following. Can anybody tell how can I store it an array and display it?
Private Sub CommandButton1_Click()
Dim sld As Slide
Dim shp As Shape
Dim x As Byte
With ActivePresentation
z = .Slides(.Slides.Count).SlideNumber
MsgBox z, vbDefaultButton1, "Total Slides"
End With
Dim myarray() As Integer
ReDim myarray(0 To 2)
For i = 2 To z
Set sld = ActivePresentation.Slides(i)
For Each shp In sld.Shapes
If shp.TextFrame.TextRange.Font.Color.RGB = RGB(255, 0, 0) Then
MsgBox i, vbDefaultButton2, "Slide with RED font"
End If
Next shp
Next
End Sub