title: Count the group of shapes in powerpoint without using .type property
body: <p>The script which I have tested is running from excel application, which will count the shapes of pictures and count of actual shapes (that is textbox,placeholder) .Below is the script which pops up messages with the count of pictures and shapes</p>
  
  <pre><code>Sub countshapes()
  Dim strname As String
  Dim thisslide As Long
  Dim strshape() As String
  
  -----Count the number of slides in presentation 
  
  For thisslide = 1 To ActivePresentation.Slides.count
  
  With ActivePresentation.Slides(thisslide)
  ReDim strshape(0 To 0)
  
  For Each oshp In .Shapes
  
  If InStr(1, oshp.Name, "Picture") &gt; 0 Then
  ReDim Preserve strshape(0 To a)
  strshape(a) = oshp.Name
  a = a + 1
  
  Else
  
  ReDim Preserve strshape(0 To d)
  strshape(d) = oshp.Name
  d = d + 1
  End If
  
  Next oshp
  End With
  Next
  MsgBox a
  MsgBox d
  </code></pre>
  
  <p>The count of shapes and pictures are displayed perfectly 
  But am unable to get the count of group of shapes, this can be easily achieved by .type=msogroup property however that property will not help me in some of the presentations which have many grouped shapes.</p>
  
  <p>Please help me to update the script by using name of the shapes likewise the above script</p>