Consulting

Results 1 to 5 of 5

Thread: DefaultlanguageID

  1. #1

    DefaultlanguageID

    Hi everybody,

    I would like to know, what the defaultlanguageid really does - I supposed that when you change it, all future textboxes and shapes will have the languageid you set there. But that is not the case.
    So, I can perfectly set the language of everything I have in my presentation, set the defaultlanguageid of it and then when I enter a new shape, it has still the wrong language. It's driving me nuts.
    Anybody can help?

    Best regards,
    Aleks

  2. #2

    Keyboard settings

    Found out that PP picks up the language from the keyboard settings. So two new questions:

    1. Why? What's the purpose of defaultlanguageid then?
    2. Can I prevent it?

    Best regards and thanks

  3. #3
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    all applications use regional settings.

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,094
    Location
    Maybe you should say what version and OS you use and the code you use.
    defaultlanguageID does what you expect here - all subsequent shapes and presentation default to that language.
    2007 on Win 7
    2010 on Win 7
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    Hi,

    thanks for the answer. I do something like:

    [vba]Sub change()
    Dim shpCurrentShape As Shape
    Dim sldCurrentSlide As Slide

    'Loop trough all shapes on all slides
    For Each sldCurrentSlide In ActivePresentation.Slides
    For Each shpCurrentShape In sldCurrentSlide.Shapes
    'Text frames
    If shpCurrentShape.HasTextFrame Then
    'If there is no text in the shape, we will need to enter a placeholder
    If shpCurrentShape.TextFrame.HasText = msoFalse Then
    'No text
    shpCurrentShape.TextFrame.TextRange = "[DUMMY]"
    End If
    shpCurrentShape.TextFrame.TextRange.LanguageID = msoLanguageIDGerman
    'If the text range has been set by us, delete it
    If shpCurrentShape.TextFrame.TextRange = "[DUMMY]" Then
    shpCurrentShape.TextFrame.TextRange = ""
    End If
    End If
    Next shpCurrentShape
    Next sldCurrentSlide

    'Set the language as default for whole presentation
    ActivePresentation.DefaultLanguageID = msoLanguageIDGerman
    End Sub[/vba]
    Now the funny thing is, that when I run it, it surely changes all the shapes into german. But when I then add a new slide, and click into a text box, it is shown as US English. When I then enter some text, it is shown as polish (my keyboard language).
    In reality, I also change the languages on all the shapes in the masters as well, so this shouldn't be a problem - didn't want to post it here as not to over-complicate the code.

    Now, what I can do is, I can turn the option in PP "Automatically switch keyboard to match language of surrounding text" on. Then everything works fine - but what if I want to keep my current keyboard setting - is there a way to stop PP from picking the keyboard language?

    I'm using Office 2010, set to english as editing language, match windows as display language and match display as help language.

    The windows is XP english.

    I have US English, German and Polish installed as proofing languages.

    I hope the above information help and I would be very thankfull for an answer to the question.

    All the best in the new year to everybody!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •