Log in

View Full Version : Changing the spell-checking language in all shapes in a PPT presentation



isabelle r
10-13-2016, 01:23 AM
Hello,

I'm working on presentations in which most of the text is contained in shapes, sometimes in multiple shapes grouped together.

These presentations are then translated into different languages, and as the language proofing tools in PPT are really terrible, I wanted to use a macro to set the spell-check language automatically for the entire presentation.

I found something online, but for some reason, it only changes the spell-checking language on some shapes, but others stubbornly remain in the original language.

This is the code:



Option Explicit
Public Sub ChangeSpellCheckingLanguage()
Dim j As Integer, k As Integer, scount As Integer, fcount As Integer
scount = ActivePresentation.Slides.Count
For j = 1 To scount
fcount = ActivePresentation.Slides(j).Shapes.Count
For k = 1 To fcount
If ActivePresentation.Slides(j).Shapes(k).HasTextFrame Then
ActivePresentation.Slides(j).Shapes(k) _
.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK
End If
Next k
Next j
End Sub


I can more-or-less find my way around macros in Excel, but PPT macros confuse me and I really can't see what's wrong here. :banghead:

Could someone please help me see where the issue is with this macro, and what to change so that it applies the selected spell-check language to all elements in the presentation, be they text areas, stand-alone shapes or grouped shapes (sometimes containing sub-groups)?

Thank you for your help,

-Isa

John Wilson
10-13-2016, 07:18 AM
The issue is simply that it is not simple. You have to consider GROUPS and SUBGROUPS, TABLES, SMART ART, NOTES, MASTERS which all have different methods and even then any NEW text added will not be in the new language. We do have an AddIn that can do all of this but it isn't free. It can also set the language for the selected presentation only which is what MSFT should have done!
http://www.pptalchemy.co.uk/Real_Lingo.html

isabelle r
10-14-2016, 01:04 AM
Looks like exactly what I'd need, but I'm not sure that my manager will be willing to pay for something I can do manually :( If it gets too frustrating, I'll buy it with my own money when I next get my paycheck. Or this might just be the occasion to understand how PPT macros work :)

Thanks for the tip.

-Isa

John Wilson
10-14-2016, 05:33 AM
Drop me an email and I'll see if we can help.

Go to www.PPTAlchemy.co.uk (http://www.PPTAlchemy.co.uk) and check the contact page for my email. If you have ever had problems with changing keyboard language changing the spell check language let me know as we are looking for people to test our solution.