How do you know? You can't "see" a space character, so it has no color.
The code looks good. I rewrote the Sub Baset for speed. I hope I put all the lines in the right loops.
I added some code lines to place a double underline on all Spaces worked on. See the Comments to see how to remove them after testing. Run this sub and look for double Underlines where Spaces are.
Sub Baset_PowerPoint_Language()
Dim sld As Slide
Dim shp As Shape
Dim L As Long
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
'Using "Wtih" is faster
With shp.TextFrame.TextRange
.Font.Name = "Arial"
.Font.NameComplexScript = "Arial"
.ParagraphFormat.TextDirection = ppDirectionRightToLeft
.RtlRun
For L = 1 To .Characters.Count
If CharType(.Characters(L)) = "English" Then
With .Characters(L)
.Font.Color = vbRed
.LanguageID = msoLanguageIDEnglishUS
End With
ElseIf CharType(.Characters(L)) = "Space" Then
If CharType(.Characters(L - 1)) = "English" And CharType(.Characters(L + 1)) = "English" Then
'Do Space Stuff on Character L
With .Characters(L)
'X Line: Remove all X lines after testing
.Font.Underline = -4119 'X line: = Double under line
'X line: Uncomment next line to remove underlines
'.Font.Underline = -4142 'X line: = no underline
.Font.Color = vbRed
.LanguageID = msoLanguageIDEnglishUS
End With
End If
End If
Next L
End With
End If
Next shp
With sld.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange
.Font.Name = "Arial"
.Font.NameComplexSc ript = "Arial"
.ParagraphFormat.Te xtDirection = ppDirectionRightToLeft
.RtlRun
End With
Next sld
End Sub
Private Function CharType(Letter As String) As String
Select Case AscW(Letter)
Case Is < 48 'do nothing
Case Is < 58 '0-9
CharType = "English"
Case Is = 32
CharType = "Space"
Case Is < 65 'do nothing
Case Is < 91 '0-9
CharType = "English"
Case Is < 97 'do nothing
Case Is < 123 '0-9
CharType = "English"
Case Is = 174
CharType = "English"
Case Is = 8482
CharType = "English"
End Select
End Function