Pages in topic:   < [1 2]
Set language in entire PPT presentation
Thread poster: Antoní­n Otáhal

iwork2ski
Local time: 14:31
including the notes page Mar 3, 2010

Antonín thanks for an excellent bit of code. Works a treat.

Did a quick check and found this entry.
http://www.vbaexpress.com/kb/getarticle.php?kb_id=429
Which shows the notespage code.

So add this line after the next k

ActivePresentation.Slides(j).NotesPage. _
Shapes.Placeholders(2).TextFrame.TextRange
... See more
Antonín thanks for an excellent bit of code. Works a treat.

Did a quick check and found this entry.
http://www.vbaexpress.com/kb/getarticle.php?kb_id=429
Which shows the notespage code.

So add this line after the next k

ActivePresentation.Slides(j).NotesPage. _
Shapes.Placeholders(2).TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK

[Edited at 2010-03-03 14:08 GMT]
Collapse


 

Andrew Alix  Identity Verified
United States
Local time: 08:31
Norwegian to English
+ ...
Other code to change language Aug 6, 2010

Appreciated your code Antonin. You might appreciate the following code. When you type it in, as soon as you type the "." you'll notice that VBA suggests the next command. When you type the "=" for the language selection, VBA will present a menu that gives you the choice of all the languages available, starting with "msoLanguageID" and ending with the language of your choice.

If you don't get the menu press "Control" plus the "j" key and it will come up
Code is as follows:
... See more
Appreciated your code Antonin. You might appreciate the following code. When you type it in, as soon as you type the "." you'll notice that VBA suggests the next command. When you type the "=" for the language selection, VBA will present a menu that gives you the choice of all the languages available, starting with "msoLanguageID" and ending with the language of your choice.

If you don't get the menu press "Control" plus the "j" key and it will come up
Code is as follows:

Sub ChangeLanguage()
Dim sld As Slide, shp As Shape
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame Then
shp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK
End If
Next shp
sld.NotesPage.Shapes.Placeholders(2).TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK
Next sld
End Sub

Not sure about the placeholders code line after "Next shp" though I think it works.

[Edited at 2010-08-06 13:42 GMT]

[Edited at 2010-08-06 13:43 GMT]
Collapse


 

Antoní­n Otáhal
Local time: 15:31
Member (2005)
English to Czech
+ ...
TOPIC STARTER
Nicer code, the same outcome Aug 6, 2010

I do know I tend to old-timer type of code.

Yours is more elegant. Thanks.

Antonin


 

Grey Drane  Identity Verified
United States
Local time: 09:31
Italian to English
Changing language w/ a macro in PowerPoint, but not PP2011 Mac. Grr! #xl8 Nov 21, 2012

Unfortunately, none of this works in PowerPoint 2011 for Mac because VBA there doesn't support the .LanguageID element for some mysterious reason.

Maybe this same sort of thing can be done in OpenOffice??? Anyone know?

Cheers,
Grey


 

wotswot  Identity Verified
France
Local time: 15:31
Member (2011)
French to English
Yet more code Nov 21, 2012

This works in Office 2010 (Windows!)
Just call ChangeLangOfAllText with the relevant Language ID

Private Function ChangeLangOfAllText(ByVal LangID As Long)
Dim MySlide As Slide
Dim MyShape As Shape
Dim MyD As Design
Dim MyHeaderFooter As HeaderFooter
Dim i, nbs As Integer
''''' First deal with the master slides
For Each MyD In ActivePresentation.Designs
For Each MyShape In MyD.SlideMaster.Shapes
ProcessShapes My
... See more
This works in Office 2010 (Windows!)
Just call ChangeLangOfAllText with the relevant Language ID

Private Function ChangeLangOfAllText(ByVal LangID As Long)
Dim MySlide As Slide
Dim MyShape As Shape
Dim MyD As Design
Dim MyHeaderFooter As HeaderFooter
Dim i, nbs As Integer
''''' First deal with the master slides
For Each MyD In ActivePresentation.Designs
For Each MyShape In MyD.SlideMaster.Shapes
ProcessShapes MyShape, msoLanguageIDEnglishUK
Next MyShape
Next MyD
''''' Now deal with the slides
For Each MySlide In ActivePresentation.Slides
For Each MyShape In MySlide.Shapes
ProcessShapes MyShape, LangID
Next MyShape
''''' Now deal with the Notes (commentaires)
For Each MyShape In MySlide.NotesPage.Shapes
ProcessShapes MyShape, LangID
Next MyShape
''''' Now deal with the master ' doesn't appear to work, have to try something else
For Each MyShape In MySlide.Master.Shapes
ProcessShapes MyShape, LangID
Next MyShape
Next MySlide
End Function

Private Function ProcessShapes(MyShape As Shape, ByVal LangID As Long)
Dim i As Integer
If ((MyShape.Type = msoGroup) Or (MyShape.Type = msoTable)) Then
On Error Resume Next
For i = 1 To MyShape.GroupItems.Count
''' The trick is to recurse!
ProcessShapes MyShape.GroupItems.item(i), LangID
Next i
Else
ChangeLang MyShape, LangID
End If
End Function
Collapse


 

Laerte da Silva  Identity Verified
Brazil
Local time: 12:31
English to Portuguese
+ ...
Set spell check language in PPT Mar 20, 2013

Hi

The macro was missing the variable definition. Here's the corrected code for both English an Brazilian Porltuguese


Sub LangInFrames_USENG()

Dim scount, j, k, fcount

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.Te
... See more
Hi

The macro was missing the variable definition. Here's the corrected code for both English an Brazilian Porltuguese


Sub LangInFrames_USENG()

Dim scount, j, k, fcount

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 = msoLanguageIDEnglishUS

'----------- for a different language, modify the msoLangauge code in the line above

End If
Next k
Next j
End Sub


Sub LangInFrames_BPR()

Dim scount, j, k, fcount

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 = msoLanguageIDBrazilianPortuguese

'----------- for a different language, modify the msoLangauge code in the line above


End If
Next k
Next j
End Sub


Other language codes in:

http://msdn.microsoft.com/en-us/library/office/ff746734.aspx



My retribution for this neat and simple code.
Collapse


 

pixie5008
France
Solution for PPT 2011? Jul 24, 2013

I am also having trouble getting the code to work for Mac Powerpoint 2011. Any suggestions on how to get this to work would be greatly appreciated!

I have tried 2 different codes I have found that seem to address this problem, and both return errors. For the following code, I receive an error message that says the "erreur de compilation: variable non définie".

Public Sub ChangeSpellCheckingLanguage()
Dim j As Integer, k As Integer, scount As Integer, fcount
... See more
I am also having trouble getting the code to work for Mac Powerpoint 2011. Any suggestions on how to get this to work would be greatly appreciated!

I have tried 2 different codes I have found that seem to address this problem, and both return errors. For the following code, I receive an error message that says the "erreur de compilation: variable non définie".

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 = msoLanguageIDFrench
End If
Next k
Next j
End Sub


For the following code (from Antonin in this thread), I receive an error message that says "erreur de compilation: member de méthode ou de données introuvable"

Sub LangInFrames()

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 = msoLanguageIDFrench
End If
Next k
Next j
End Sub

Thanks!

Grey Drane wrote:

Unfortunately, none of this works in PowerPoint 2011 for Mac because VBA there doesn't support the .LanguageID element for some mysterious reason.

Maybe this same sort of thing can be done in OpenOffice??? Anyone know?

Cheers,
Grey
Collapse


 

Daniel Grau  Identity Verified
Argentina
English to Spanish
For Macs only Sep 5, 2013

Check this page. You'll have to replace the name of your language. It's a little slow, but it works.

http://macscripter.net/viewtopic.php?id=38622


 
Pages in topic:   < [1 2]


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Set language in entire PPT presentation

Advanced search






SDL MultiTerm 2019
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2019 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2019 you can automatically create term lists from your existing documentation to save time.

More info »
TM-Town
Manage your TMs and Terms ... and boost your translation business

Are you ready for something fresh in the industry? TM-Town is a unique new site for you -- the freelance translator -- to store, manage and share translation memories (TMs) and glossaries...and potentially meet new clients on the basis of your prior work.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search