-
I changed some code on the Function and the below code is worked well:
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
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
With .Characters(L)
'.Font.Underline = -4119
.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.NameComplexScript = "Arial"
.ParagraphFormat.TextDirection = ppDirectionRightToLeft
.RtlRun
End With
Next sld
End Sub
Private Function CharType(Letter As String) As String
Select Case AscW(Letter)
Case Is = 32
CharType = "Space"
Case 48 To 57 '0-9
CharType = "English"
Case 65 To 90 'A-Z
CharType = "English"
Case 97 To 122 'a-z
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