-
i used the below suggested code but space is not changed yes:
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
shp.TextFrame.TextRange.Font.Name = "Arial"
shp.TextFrame.TextRange.Font.NameComplexScript = "Arial"
shp.TextFrame.TextRange.ParagraphFormat.TextDirection = ppDirectionRightToLeft
shp.TextFrame.TextRange.RtlRun
End If
Next shp
sld.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.Font.Name = "Arial"
sld.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.Font.NameComplexSc ript = "Arial"
sld.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.ParagraphFormat.Te xtDirection = ppDirectionRightToLeft
sld.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.RtlRun
Next sld
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
If shp.TextFrame.HasText Then
With shp.TextFrame.TextRange
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)
.Font.Color = vbRed
.LanguageID = msoLanguageIDEnglishUS
End With
End If
End If
Next L
End With
End If
End If
Next shp
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules