PDA

View Full Version : help with me change Proofing language macro



Ethen5155
04-15-2016, 08:56 AM
Hi all,

simply i got a code to change proofing language to all slides for my presentation from English to Arabic, but i found that there are some shapes and tables are excluded from macro and still English as it is

the code is:


Sub ChangeProofingLanguageToArabic() Dim j, k, m, scount, fcount, gcount As Integer
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k) _
.TextFrame.TextRange.LanguageID = msoLanguageIDArabic
End If
If ActivePresentation.Slides(j).Shapes(k).Type = msoGroup Then
gcount = ActivePresentation.Slides(j).Shapes(k).GroupItems.Count
For m = 1 To gcount
If ActivePresentation.Slides(j).Shapes(k).GroupItems.Item(m).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k).GroupItems.Item(m) _
.TextFrame.TextRange.LanguageID = msoLanguageIDArabic
End If
Next m
End If
Next k
Next j
End Sub



and i attached a sample pptx file that i'm working on, and this are the shapes i'm talking about on file

159321593315934



ONE MORE THING, i want this code to exclude numbers and english words from being changed to arabic and stay as it is on english , with other words i need macro to apply arabic langaue to arabic words only


thanks in advance