Pages in topic:   < [1 2]
Set language in entire PPT presentation
Thread poster: Antoní­n Otáhal
iwork2ski
iwork2ski
Local time: 19:10
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
Andrew Alix  Identity Verified
United States
Local time: 13:10
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
Antoní­n Otáhal
Local time: 20:10
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 (X)
Grey Drane (X)  Identity Verified
United States
Local time: 14:10
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
wotswot  Identity Verified
France
Local time: 20:10
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
Laerte da Silva  Identity Verified
Brazil
Local time: 15:10
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
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
Daniel Grau  Identity Verified
Argentina
Member (2008)
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






Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »
Wordfast Pro
Translation Memory Software for Any Platform

Exclusive discount for ProZ.com users! Save over 13% when purchasing Wordfast Pro through ProZ.com. Wordfast is the world's #1 provider of platform-independent Translation Memory software. Consistently ranked the most user-friendly and highest value

Buy now! »