Last active
June 16, 2025 08:16
-
-
Save teknologika/726277d0e825d5dfd145e8afb5fe9245 to your computer and use it in GitHub Desktop.
Change PPT Language
This file contains hidden or 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
| 'Change the language of your PowerPoint | |
| 'In newer PowerPoint version, you need to first save your PowerPoint with macros enabled. | |
| 'Go to the VIEW tab, select MACROS (at the right), enter a name, e.g. toEnglish, and press create to enter below text. | |
| 'Now you can run the macro from the same menu. | |
| 'Alternatively, but less complete, go to the VIEW tab, select OUTLINE, select all slides (using CTRL-A). | |
| 'Now go to the REVIEW tab, select Language, and change the proofing language. | |
| 'Also make sure that you set the WINDOWS Language (taskbar, bottom right) to the preferred language, otherwise all new text | |
| 'will have the same problem (Press CTRL + WINDOWS + SPACE to switch the Keyboard input language). | |
| Option Explicit | |
| Sub toAUEnglish() | |
| Dim iRows, iCol, j, k, m, scount, fcount, gcount, language As Integer | |
| 'A list of languages can be found here: https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/aa432635(v=office.12) | |
| 'For example, US English is msoLanguageIDEnglishUS, or if you prefer NZ English, use msoLanguageIDEnglishNewZealand | |
| language = msoLanguageIDEnglishAUS | |
| scount = ActivePresentation.Slides.Count | |
| For j = 1 To scount | |
| fcount = ActivePresentation.Slides(j).Shapes.Count | |
| For k = 1 To fcount 'change all shapes: | |
| If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then | |
| ActivePresentation.Slides(j).Shapes(k) _ | |
| .TextFrame2.TextRange.LanguageID = language | |
| 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) _ | |
| .TextFrame2.TextRange.LanguageID = language | |
| End If | |
| Next m | |
| End If | |
| If ActivePresentation.Slides(j).Shapes(k).Type = msoTable Or _ | |
| ActivePresentation.Slides(j).Shapes(k).HasTable Then | |
| Dim oShp As Shape | |
| Set oShp = ActivePresentation.Slides(j).Shapes(k) | |
| For iRows = 1 To oShp.Table.Rows.Count | |
| For iCol = 1 To oShp.Table.Rows(iRows).Cells.Count | |
| oShp.Table.Rows(iRows).Cells(iCol).Shape.TextFrame2.TextRange.LanguageID = language | |
| Next | |
| Next | |
| End If | |
| Next k | |
| fcount = ActivePresentation.Slides(j).NotesPage.Shapes.Count | |
| For k = 1 To fcount 'change all shapes: | |
| If ActivePresentation.Slides(j).NotesPage.Shapes(k).HasTextFrame Then | |
| ActivePresentation.Slides(j).NotesPage.Shapes(k).TextFrame2 _ | |
| .TextRange.LanguageID = language | |
| End If | |
| Next k | |
| Next j | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment