Word Count for INDIVIDUAL slides??

  • Thread starter Thread starter Casabee
  • Start date Start date
C

Casabee

I would like to find a macro or other program to tell me the word count for
individual slides- ANY suggestions?
 
following code can count words on each slide ( even inside table cells) and
out put with a message box. Obviously you can change the output method
Sub wordCount()
Dim osld As Slide
Dim oShp As Shape
Dim LCount As Long

For Each osld In ActivePresentation.Slides
For Each oShp In osld.Shapes
If oShp.HasTextFrame Then
If oShp.TextFrame.HasText Then

LCount = LCount + oShp.TextFrame.TextRange.Words.Count
End If
ElseIf oShp.HasTable Then
CCount = oShp.Table.Columns.Count
RCount = oShp.Table.Rows.Count
For CIndex = 1 To CCount
For RIndex = 1 To RCount
LCount = LCount + oShp.Table.Cell(RIndex, _
CIndex).Shape.TextFrame.TextRange.Words.Count
Next
Next
End If
Next oShp
MsgBox "slide : " & osld.SlideIndex & " word count : " & LCount
LCount = 0
Next osld

End Sub
 
Back
Top