Change of grammar language for whole presentation
I often hear about how to change the language grammar checker in a presentation on all slides at once. In text fields it is possible after their creation to change the language on the Review tab, or the status bar, but this change is not reflected to the other text boxes. Such long work is perhaps not fun, and therefore there is this tutorial with working way. 🙂
To achieve the desired changes of language on all slides, we need to create a macro, which is the code in VBA (Visual Basic for Applications). Macro in most cases, will resolve what normal process solution does not. You can get into an environment for creating macros through the Developer tab, but much faster is the combination ALT + F11 to let us in VBA editor.
Now we set a new module according to the picture below.
Inside the text area so called module, that we just created, insert following code, you can copy directly from this site:-).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | Sub anglicky() PocetSnimku = ActivePresentation.Slides.Count For s = 1 To PocetSnimku PocetPoli = ActivePresentation.Slides(s).Shapes.Count For p = 1 To PocetPoli If ActivePresentation.Slides(s).Shapes(p).HasTextFrame Then ActivePresentation.Slides(s).Shapes(p).TextFrame.TextRange _ .LanguageID = msoLanguageIDEnglishUK End If Next p Next s End Sub Sub cesky() PocetSnimku = ActivePresentation.Slides.Count For s = 1 To PocetSnimku PocetPoli = ActivePresentation.Slides(s).Shapes.Count For p = 1 To PocetPoli If ActivePresentation.Slides(s).Shapes(p).HasTextFrame Then ActivePresentation.Slides(s).Shapes(p).TextFrame.TextRange _ .LanguageID = msoLanguageIDCzech End If Next p Next s End Sub |
To be able to use the macro, save the file as a slide show with macros support, ending PPTM and then we can run the macro via the View tab, where on the ride side can be found Macros button. Our two macros for Czech and English language grammar checker will change the settings on all slides. We launch the Macro at the moment when all texts are already prepared on the slides. Thank for the inspiration to my colleague Lucie Mařáková.
If this guide has helped you, become a fan on Facebook and recommend this site to your friends, it can be useful for them too.
2 komentáře
tisíceré díky, dlouho sem hledal takové řešení.
Vynikající, díky. Funguje na celé prezentaci. Bohužel ale ne v komentářích, kde bych to aktuálně potřeboval. Existuje nějaké řešení úpravou kódu makra?
Děkuji