I don't really need to "Check the below code" because it has been lifted from our website. It is designed to do something else entirely and cannot be used to changed the number language.
I still don't see what you are trying to achieve (or rather why) but this code should just change the number language. Just top of my head code - not tested.
Sub just_Numbers() Dim iCol As Integer Dim iRow As Integer Dim otbl As Table Dim osld As Slide Dim oshp As Shape For Each osld In ActivePresentation.Slides For Each oshp In osld.Shapes Select Case oshp.HasTable Case False If oshp.HasTextFrame Then If oshp.TextFrame.HasText Then Call fixLang(oshp) End If Case True Set otbl = oshp.Table For iRow = 1 To otbl.Rows.Count For iCol = 1 To otbl.Columns.Count If otbl.Cell(iRow, iCol).Shape.TextFrame.HasText Then Call _ fixLang(otbl.Cell(iRow, iCol).Shape) Next iCol Next iRow End Select Next oshp Next osld End Sub Sub fixLang(oshp As Shape) Dim W As Long For W = 1 To oshp.TextFrame.TextRange.Words.Count If IsNumeric(oshp.TextFrame.TextRange.Words(W)) Then oshp.TextFrame.TextRange.Words(W).LanguageID = msoLanguageIDEnglishUS End If Next W End Sub




Reply With Quote
