View Single Post
 
Old 03-29-2015, 09:03 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

This is off the top of my head and I don't have a Mac. (Don't think 2008 supports vba code) Use on a copy anyway.

Also it will NOT search tables, smart art etc just simple text in placeholders or textboxes.

Code:
Sub findLCConsonants()
Dim osld As Slide
Dim oshp As Shape
Dim L As Long
For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
For L = 1 To oshp.TextFrame.TextRange.Length
Select Case Asc(oshp.TextFrame.TextRange.Characters(L))
'less than 97 or > 122 are not lowercase
'65,101,105,111,117 are vowels
Case Is < 97, 65, 101, 105, 111, 117, Is > 122
'do nothing
Case Else
oshp.TextFrame.TextRange.Characters(L).Font.Color.RGB = RGB(0, 0, 0)
End Select
Next L
End If
End If
Next oshp
Next osld
End Sub
Reply With Quote