Google Answers Logo
View Question
 
Q: Office XP making a Global Language Change from English to Spanish ( Answered 4 out of 5 stars,   0 Comments )
Question  
Subject: Office XP making a Global Language Change from English to Spanish
Category: Computers
Asked by: peterp-ga
List Price: $20.00
Posted: 05 May 2003 17:21 PDT
Expires: 04 Jun 2003 17:21 PDT
Question ID: 199928
I often work with multiple languages in Office XP with word and in
particular powerpoint. In powerpoint to use the Spanish spell checker
I need to go to each slide and select all the text box and then go to
"Tools" and then "Language" to change from English to Spanish. Once I
have changed the text boxes to Spanish I use the spell checker for
Spanish. This takes forever to repeat for each slide one at a time.

Is there a "global" change option in powerpoint to change all the
slides were at one time in English to Spanish? I know how to change
the language to default to Spanish for new text boxes and new slides
but this does not change text boxes or slides that were generated in
English.
Answer  
Subject: Re: Office XP making a Global Language Change from English to Spanish
Answered By: voyager-ga on 06 May 2003 01:08 PDT
Rated:4 out of 5 stars
 
Hi peterp,

to change the language selection for your whole document,

1) select the "Outline" view (on top of the small window on the left)

2) click into the window that shows you the "Outline" view (without
selecting any text),

3) press CTRL+A to select the whole text,

4) select your language from the extras menu as you usually do when
creating new text boxes.

That should have done it.

If you experience trouble or require additional information feel free
to request a clarification at any time.

voyager-ga

Search Strategy:

Powerpoint Help: Outline View

Request for Answer Clarification by peterp-ga on 06 May 2003 05:20 PDT
voyager-ga,

This is very good and works on all the text that shows up in outline
mode.

However, if the text is not listed in the outline mode it still does
not change the language. I still need to do this by going to each
slide ctrl A and then change the langauge. Since the material I have
has numerous text boxes I stiil essential need to change the language
on each slide one at a time.

Any suggestions to resolve text boxes?

Thanks

Peter

Clarification of Answer by voyager-ga on 06 May 2003 11:26 PDT
Hi peterp,

I'm sorry that I didn't give you a complete answer to your question. I
will try to find a solution to this problem ASAP. Sorry for the delay.

voyager-ga

Request for Answer Clarification by peterp-ga on 06 May 2003 12:06 PDT
voyager-ga,

I did look back and I was quite clear concerning the text boxes. I
looked another hour myself today since it is down to simply being able
to select the text.

I have not seen a way to select all the text including text boxes for
all powerpoint slides at the same time. I know how to use ctrl a and
do slide by slide.

Thanks

Peter

Clarification of Answer by voyager-ga on 06 May 2003 17:59 PDT
Hi Peter,

I was not trying to imply that you didn't clearly state that you
wanted an answer concerning text boxes - I have to appologize for
completely misinterpreted this part.

I will continue to look for a better solution, but I have found a way
that might provide an easier approach to changing the language:

1) Start Macro>Script-Editor (ALT+SHIFT+F11)
2) In the Project Explorer Window: Open all relevant pages (this is
the tedious part)
3) Press CTRL+H to get the search and replace dialogue box
4) Enter e.g. lang=EN-US (for US-English) into the search filed
5) Enter e.g. lang=ES-TRAD (for Spanish-Traditional) into the replace
field
6) Select replacement in all open documents
7) Press the replace all button
8) Apply the changes with the little popup window that pops up when
you change back to your powerpoint presentation.

All the text-boxes should now be in traditional Spanish.

I know that this isn't the most simple solution, but combined with my
first answer it should at least help a little. I will return to this
question tomorrow and see if I can come up with a way of solving this
issue with a macro.

Again, I have to say sorry for the delay. If I can't come up with your
solution tomorrow, I will ask the editors to remove my answer, so
another researcher can try to solve this problem.


voyager-ga

Request for Answer Clarification by peterp-ga on 06 May 2003 20:08 PDT
voyager,

I just wanted to double check to make sure I was clear on my question.

Thanks for letting the question go to give another person a chance if
you don't get it in another day. There should be a way. I thought of
creating a new desihn template in Mexican Spanish and importing the
slides but it also did not seem to work at least for me.

Reagrds,

Peter

Clarification of Answer by voyager-ga on 07 May 2003 03:42 PDT
Hi Peter,

it took me quite a while and I had to learn VBA Programming to do it,
but I think I finally managed to find a solution to the problem:

1) Start your Powerpoint
2) Start Extras>Macro>Visual Basic Editor (alternatively ALT+F11)
3) Create a new Module in the Objekt Browser (ask for clarification if
you have problems with this and I'll run you through it step by step)
4) insert the Text below into the new module window:

--- Save text below

Sub ToMexicanSpanish

Dim oSld As Slide
Dim oShp As Shape

For Each oSld In ActivePresentation.Slides
    For Each oShp In oSld.Shapes
        If oShp.Type = msoGroup Then
            For I = 1 To oShp.GroupItems.Count
                Call FindAndChgLang(oShp)
            Next I
        Else
            Call FindAndChgLang(oShp)
        End If
    Next oShp
Next oSld
End Sub

Function FindAndChgLang(oShp As Shape)

Dim I As Integer
Dim oTxtRng As TextRange
On Error Resume Next
If oShp.HasTextFrame Then
    If oShp.TextFrame.HasText Then
        Set oTxtRng = oShp.TextFrame.TextRange
        For I = 1 To oTxtRng.Runs.Count
            oTxtRng.Runs(I).LanguageID = msoLanguageIDMexicanSpanish
        Next I
    End If
End If
End Function

--- Save text above

6) Close the Editor and go back to your Powerpoint

You can now apply the macro throu the Macro menu or you can make an
icon specifically for this macro (it is listed in the macro section if
you right click next to your existing icons in the icon bar and select
the customize option)

If you have any troubles with my script, feel free to request a
clarification. I tested it on normal text and text boxes and it worked
on both on my system.

Sorry again for the delay - but I hope it was worth it!


voyager-ga

Clarification of Answer by voyager-ga on 07 May 2003 03:48 PDT
Hi Peter,

there's one small typo in the script - the first line should read

Sub ToMexicanSpanish()

instead of

Sub ToMexicanSpanish

the editor would have corrected that automatically - but I don't want
to take any chances.

voyager-ga

Request for Answer Clarification by peterp-ga on 07 May 2003 06:50 PDT
voyager,

Almost there.

1. I was able to get the macro working and it changes most text to
Mexican Spanish. However, it does not change text that is "grouped"
together. I needed to first ungroup the text. Note the one slide at a
time method does change all text included grouped text.

2. I was not clear how to save the macro so it can be used by all
files and the icon. Perhaps a little more direction or a link. I have
a friend who knows macros so he could help if is difficult to explain.

3. What are the msoLanguageIDMexicanSpanish for Italian and English
and Brazilian Portuguese.

Thanks for you hard work.

Peter

Clarification of Answer by voyager-ga on 07 May 2003 17:13 PDT
Hi Peter,

I'm pretty confident, we can work out the last problems, too:

3) Language Codes:
Italian: msoLanguageIDItalian
English: msoLanguageIDEnglishUK (original English)
English: msoLanguageIDEnglishUS (US English)
Brazilian Portuguese: msoLanguageIDBrazilianPortuguese

1) Ok, I didn't check well enough - this was a bug in my programm:

---

Sub ToMexicanSpanish()
 
Dim oSld As Slide
Dim oShp As Shape
 
For Each oSld In ActivePresentation.Slides
    For Each oShp In oSld.Shapes
        Call CrawlShapes(oShp)
    Next oShp
Next oSld
End Sub
 
Function FindAndChgLang(oShp As Shape)
 
Dim I As Integer
Dim oTxtRng As TextRange
On Error Resume Next
If oShp.HasTextFrame Then
    If oShp.TextFrame.HasText Then
        Set oTxtRng = oShp.TextFrame.TextRange
        For I = 1 To oTxtRng.Runs.Count
            oTxtRng.Runs(I).LanguageID = msoLanguageIDMexicanSpanish
        Next I
    End If
End If
End Function

Function CrawlShapes(oShp As Shape)

If oShp.Type = msoGroup Then
    For I = 1 To oShp.GroupItems.Count
        Call CrawlShapes(oShp.GroupItems.Item(I))
    Next I
Else
    Call FindAndChgLang(oShp)
End If

End Function

---

It should now work with grouped text, too.

2) To permanently add your macro to e.g. your Powerpoint menues or to
an icon bar, you'll have to make it into an add-in. How you can do
this is demonstrated in this MS Knowledge Base article.

Microsoft Knowledge Base Article - 222737
PPT2000: How to Create a PowerPoint Add-In
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q222/7/37.ASP&NoWebContent=1


I hope you found this clarification helpful! Should you encounter any
problems with the code or my explanation, feel free to ask for
clarification at any time.


voyager-ga
peterp-ga rated this answer:4 out of 5 stars and gave an additional tip of: $5.00
Voyager, 
Did an outstanding job follow through to answer to initial question,
The solution was much more difficult than the question. I had hoped
for an easier solution but there may not be one.

Thanks this will be a big time saver!

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy