Change presentation language


Target Application: Microsoft PowerPoint

Programming Language: VBA

Now we can start coding. I will describe the next steps directly in the code as comments, so you don’t have to put the different parts back together at the end. This way, you can copy the entire code and run it in your PowerPoint application.
To run the macro, simply click on the green play button at the top of the VBA Editor (or press F5 on your keyboard).

' This macro is brought to you by DG | ELEVATE YOUR BUSINESS
' Author: Daniel Glöckner
' Last update: 2022/03/03
' Feel free to copy, use, adjust, and share

' Macro purpose: Change presentation language

Option Explicit ' Forces all variables to be explicitly declared


Sub ProcessSlides()
' Process all slides in presentation

' Define variables
Dim sld As Slide
Dim shp As Shape

' Process slides
For Each sld In ActivePresentation.Slides
    ' Process all shapes on slide
    For Each shp In sld.Shapes
        If shp.HasTextFrame Then
            ChangeLanguage shp.TextFrame.TextRange
        End If
    Next shp
Next sld
End Sub

Private Function ChangeLanguage(tf)
' Change text frame language

' Define variables
Dim newLang As MsoLanguageID

' Change the language to US English
' NOTE: To change the language ID to another language,
' change the msoLanguageID value
newLang = msoLanguageIDEnglishUS

tf.LanguageID = newLang

End Function