Navigate / search

Changing language of your all slides in presentation – spellchecker in PowerPoint

I wonder how often you are struggling with a small issue that is very irritating and there is a low chance of solving it or at least you do not see any potential for addressing it. For me, such a thing was PowerPoint spellchecker. Right now, I would say that most of your presentation should be done in English and this is a natural choice for me. And there is a small issue related to PowerPoint. Microsoft application is not perfect and it has small issues with languages:

As you can see this whole slide is in English and I added only one sentence to it to show you how it works. And as you can see PowerPoint is showing that there are some errors in it. Form my perspective this behaviour is a bit weird. My whole presentation is in English and the last sentence is recognised as in Polish. The solution to this issue is quite simple. You need to select all items where language has been wrongly detected and correct language that is assigned to them.

Last time I decided that I should solve this issue because I was waisting to much time on it. I needed to figure out a solution that will work as described but automatically. And the solution was just a few steps in front of me – VBA. We can write a simple macro that will do all described actions:

Sub ChangeProofingLanguageToEnglish()
  Dim j, k As Integer
  Dim languageID As MsoLanguageID

  'Set this to your preferred language
  languageID = msoLanguageIDEnglishUK

  'Loop all the slides in the document, and change the language
  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

  'Loop all the master slides, and change the language
  For j = 1 To ActivePresentation.SlideMaster.CustomLayouts.Count
    For k = 1 To ActivePresentation.SlideMaster.CustomLayouts(j).Shapes.Count
      ChangeAllSubShapes ActivePresentation.SlideMaster.CustomLayouts(j).Shapes(k), languageID
    Next k
  Next j

  'Change the default presentation language, so that all new slides respect the new language
  ActivePresentation.DefaultLanguageID = languageID
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

Just one thing. Please remember that this macro should be inserted as a module. I hope you can see that you can change proofing language by updating the following line:

languageID = msoLanguageIDEnglishUK

And running it is very simple. You need to go to Developer tab an open Macros. Then you need to find our macro on the list and run it:

With such a small thing, you can save a lot of your time.

Comments

avatar
Mike W
Reply

Absolutely brilliant -- this is the best version I’ve found on the internet. It saved me so much time -- well done and thanks!

Leave a comment

name*

email* (not published)

website

This site uses Akismet to reduce spam. Learn how your comment data is processed.

.