Translation in PPT

B

BrianF

I frequently translate PowerPoint presentations from French or Dutch into
English but I do get tired of having to highlight every slide to change the
language for checking purposes. It is so easy in MS-Word, where 'Select all'
means the whole document. In ppt, it only means the whole slide.
Is there any way of selecting all slides and changing the editing language
overall?

Thanks,

Brian
 
J

John Wilson

A little vba is the answer!


Sub Lingo()

Dim osld As Slide
Dim oshp As Shape

For Each osld In ActivePresentation.Slides
For Each oshp In sld.Shapes
If oshp.Type = msoTextBox Or msoPlaceholder Then
If oshp.HasTextFrame Then
oshp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK
End If
End If
Next
Next
End Sub
--
Don't know how to use vba?? See here:
http://www.rdpslides.com/pptfaq/FAQ00033.htm

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
 
B

BrianF

John Wilson said:
A little vba is the answer!


Sub Lingo()

Dim osld As Slide
Dim oshp As Shape

For Each osld In ActivePresentation.Slides
For Each oshp In sld.Shapes
If oshp.Type = msoTextBox Or msoPlaceholder Then
If oshp.HasTextFrame Then
oshp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK
End If
End If
Next
Next
End Sub
--
Don't know how to use vba?? See here:
http://www.rdpslides.com/pptfaq/FAQ00033.htm

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
Thanks so much John for your fast response. I have no knowledge of vba but I
will certainly give it a try and report back. As I am in Europe, that will
be tomorrow.

Brian
 
B

BrianF

John Wilson said:
A little vba is the answer!


Sub Lingo()

Dim osld As Slide
Dim oshp As Shape

For Each osld In ActivePresentation.Slides
For Each oshp In sld.Shapes
If oshp.Type = msoTextBox Or msoPlaceholder Then
If oshp.HasTextFrame Then
oshp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK
End If
End If
Next
Next
End Sub
--
I guess I must be doing something wrong. When I try to run this macro in my
presentation I get Error 424. Then I click on Debug and it highlights the
line:

For Each oshp In sld.Shapes

Does that mean anything to you?

Thanks,

Brian
 
B

BrianF

BrianF said:
That did it.
Sorry to have to retract that. It seems that it only works on some slides
but not all. In fact, it seems that it does not work when there is more than
one text box on a slide.
Unfortunately I don't have a clue in vba so any further help would be
appreciated.

Thanks,

Brian
 
B

BrianF

Steve Rindsberg said:
Are your text boxes really text boxes or might some of them be autoshapes?
Let's try it like so:

Sub BingoLingo()
Dim osld As Slide
Dim oshp As Shape

For Each osld In ActivePresentation.Slides
For Each oshp In osld.Shapes
' no more fooling around. If it has text, whack it
If oshp.HasTextFrame Then
oshp.TextFrame.TextRange.LanguageID = msoLanguageIDEnglishUK
End If
Next ' Shape
Next ' Slide

End Sub
That indeed seems to have done the trick. It makes me want to know more
about vba.

Many thanks,

Brian
 
B

BrianF

BrianF said:
That indeed seems to have done the trick. It makes me want to know more
about vba.
The next question that arises for me is, "Is there a repid way to insert
that macro in any presentation rather than having to go the copy and paste
route?"
The thing is, I work in some ppt files that need translation into English
and others that have to be translated. The macro only needs to run after
translation so it would be useful to have a quick way of running it without
having to find the text file and then copy/paste it into the VBA editor
every time.

Many thanks,

Brian
 
J

John Wilson

This can be adapted as an add in which will run from the menu. Sorry about
the typo sld for osld by the way. When Ive got chance I'll email it to you
(if thats not your real email buzz me at john AT SIGN technologytrish.co.uk
--

Did that answer the question / help?
_____________________________
John Wilson
Microsoft Certified Office Specialist
http://www.technologytrish.co.uk/ppttipshome.html
 
B

BrianF

BrianF said:
The next question that arises for me is, "Is there a repid way to insert
that macro in any presentation rather than having to go the copy and paste
route?"
The thing is, I work in some ppt files that need translation into English
and others that have to be translated. The macro only needs to run after
translation so it would be useful to have a quick way of running it
without having to find the text file and then copy/paste it into the VBA
editor every time.
I think I had a bout of Alzheimer there. What I really meant was:
The thing is, I work in some ppt files that are already in English and
others that have to be translated. The macro only needs to run after
translation so it would be useful to have a quick way of running it
without having to find the text file and then copy/paste it into the VBA
editor every time.

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top