Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried the trick explained in a related discussion, but could not change the proofing language for all texts in all slides of a PowerPoint 2007 presentation.

Could this be a feature of PowerPoint 2007?

The following VBA "monster" did the job, but I am looking for an easier way which does not require VBA. Any ideas?

Option Explicit

Private Sub btnGerman_Click()
    Call LanguageChange(msoLanguageIDGerman)
End Sub

Private Sub btnEnglish_Click()
    Call LanguageChange(msoLanguageIDEnglishUK)
End Sub

Public Sub LanguageChange(LanguageID As Integer)
    Dim sld As Slide
    Dim shp As Shape
    Dim cnt As Integer
    Dim cntAll As Integer

    On Error GoTo ErrHandler
    Me.btnEnglish.Enabled = False
    Me.btnGerman.Enabled = False
    cntAll = ActivePresentation.Slides.Count
    cnt = 0
    For Each sld In ActivePresentation.Slides
        For Each shp In sld.Shapes
            If shp.HasTextFrame Then
                shp.TextFrame.TextRange.LanguageID = LanguageID
            Else
                ShapeLanguageChange shp, LanguageID
            End If
        Next
        cnt = cnt + 1
        o cnt & " / " & cntAll
    Next

    Me.btnEnglish.Enabled = True
    Me.btnGerman.Enabled = True
    Exit Sub

ErrHandler:
    MsgBox "Ooops! " & Err.Description, vbCritical, "Error!"
    Err.Clear
    Me.btnEnglish.Enabled = True
    Me.btnGerman.Enabled = True
End Sub

Private Sub o(s As String)
    Me.Label1.Caption = s
    DoEvents
End Sub

Private Sub ShapeLanguageChange(sh As Shape, LanguageID As Integer)
    Dim sha As Shape

    If sh.Type = msoGroup Then
        For Each sha In sh.GroupItems
            If sha.Type = msoGroup Then
                ShapeLanguageChange sha, LanguageID
            ElseIf sha.HasTextFrame Then
                sha.TextFrame.TextRange.LanguageID = LanguageID
            End If
        Next
    End If
End Sub
share|improve this question
    
It seems that your code is the only good idea. I can't find any property or method which could set language of existing presentation with effect for all text within document. What I find works rather for new presentation, unfortunately. –  Kaz Jaw Apr 15 '13 at 20:35
    
KazJaw is correct. While you could in theory do a lot of the work manually, the amount of effort involved is astonishing. If you're after a ready-made solution, I have commercial add-in for this at pptools.com/languageselector and even that doesn't pick up some odds and ends (charts and such). –  Steve Rindsberg Jun 19 '13 at 14:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.