Created
January 6, 2017 16:25
-
-
Save patrickdappollonio/c584a214969e1d6472434607eb4edf8d to your computer and use it in GitHub Desktop.
Cambia el idioma de los elementos de una presentación PowerPoint a Español
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Español() | |
ChangeProofingLanguageToSpanish | |
End Sub | |
Sub ChangeProofingLanguageToSpanish() | |
Dim j, k As Integer | |
Dim languageID As MsoLanguageID | |
' Selecciona tu lenguaje preferido y ponlo debajo. La lista | |
' completa está en https://msdn.microsoft.com/en-us/library/aa432635.aspx | |
languageID = msoLanguageIDSpanishChile | |
For j = 1 To ActivePresentation.Slides.Count | |
For k = 1 To ActivePresentation.Slides(j).Shapes.Count | |
ChangeAllSubShapes ActivePresentation.Slides(j).Shapes(k), languageID | |
Next k | |
Next j | |
End Sub | |
Sub ChangeAllSubShapes(targetShape As Shape, languageID As MsoLanguageID) | |
Dim i As Integer, r As Integer, c As Integer | |
If targetShape.HasTextFrame Then | |
targetShape.TextFrame.TextRange.languageID = languageID | |
End If | |
If targetShape.HasTable Then | |
For r = 1 To targetShape.Table.Rows.Count | |
For c = 1 To targetShape.Table.Columns.Count | |
targetShape.Table.Cell(r, c).Shape.TextFrame.TextRange.languageID = languageID | |
Next | |
Next | |
End If | |
Select Case targetShape.Type | |
Case msoGroup, msoSmartArt | |
For i = 1 To targetShape.GroupItems.Count | |
ChangeAllSubShapes targetShape.GroupItems.Item(i), languageID | |
Next i | |
End Select | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment