Kawser
Apr 7th, 2006, 02:13 PM
Hello, this code was suppose to count WordArt only but it also counts picture how do I just do WordArt count not picture and picture count by itself thanks.
Sub Counter()
Dim WordArt As Integer
Dim Counter As Integer
Dim Slide As Integer
Counter = 0
With PowerPoint.ActivePresentation
For Slide = 1 To .Slides.Count
For WordArt = 1 To .Slides(Slide).Shapes.Count
If .Slides(Slide).Shapes(WordArt).AutoShapeType = -2 Then
Counter = Counter + 1
End If
Next WordArt
Next Slide
End With
MsgBox "There are " & Slide - 1 & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & Counter & " Wordart(s) in this presentation", vbQuestion
Save.Show
End Sub
Sub Counter()
Dim WordArt As Integer
Dim Counter As Integer
Dim Slide As Integer
Counter = 0
With PowerPoint.ActivePresentation
For Slide = 1 To .Slides.Count
For WordArt = 1 To .Slides(Slide).Shapes.Count
If .Slides(Slide).Shapes(WordArt).AutoShapeType = -2 Then
Counter = Counter + 1
End If
Next WordArt
Next Slide
End With
MsgBox "There are " & Slide - 1 & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & Counter & " Wordart(s) in this presentation", vbQuestion
Save.Show
End Sub