Log in

View Full Version : [SOLVED:] Change "Set Proofing Language" for all objects on all slides, to UK English



Stephpierre
10-30-2016, 12:12 PM
Hi everyone,

Long time lurker here, finally decided to make the jump and open an account. Hopefully I can help you guys out as much as you've done for me!

I'm currently working on putting together a little macro toolbar for myself. As a heavy PPT user I love little shortcuts to shave off those needed few seconds for simple processes. I have two little issues at hand, the first one I'm facing is putting together a Macro that will go through every object, in every slide and change the "Proofing language" to UK English. The reason this will be a life saver, is that currently when putting presentations together from different sources (and other languages), it doesn't put them into the default language of my PPT, and leaves horrible red lines underneath correctly spelled words (or doesn't detect when they're wrong...).

The second one is a code that I had found previously on this site (see below). What I am trying to achieve in addition, is to change the colour of the title back to what it was in the master. Is this even possible without manually giving it the RGB code?

Sub title_fix()

Dim osld As Slide
Dim oshp As Shape
Dim ocust As Shape
For Each osld In ActivePresentation.Slides
If osld.Shapes.HasTitle Then
Set oshp = osld.Shapes.Title
Set ocust = osld.CustomLayout.Shapes.Title
With oshp
.Left = ocust.Left
.Top = ocust.Top
.Height = ocust.Height
.Width = ocust.Width
.TextFrame2.TextRange.Font.Name = ocust.TextFrame2.TextRange.Font.Name
.TextFrame2.TextRange.Font.Size = ocust.TextFrame2.TextRange.Font.Size
.TextFrame2.TextRange.Font.Colour = ocust.TextFrame2.TextRange.Font.Colour (it bugs at 'Colour')


End With
End If
Next osld
End Sub


Hopefully someone out there has a little solution for me :)

Thanks!

S.p.

John Wilson
10-30-2016, 02:21 PM
You syntax is not correct for using TextFrame2 object

Try

.TextFrame2.TextRange.Font.Fill.ForeColor.RGB = ocust.TextFrame2.TextRange.Font.Fill.ForeColor.RGB

Stephpierre
10-31-2016, 01:13 AM
Thanks John, this works a treat.

Also managed to figure out how to change the proofing language.

Sub SetProofLangENGUK()

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 = msoLanguageIDEnglishUK
End If
Next k
Next j
End Sub

John Wilson
10-31-2016, 12:00 PM
That code will do a pretty incomplete job. Tables, Groups and Smart Art are some of the things it will miss as well as notes pages etc. In some versions (older) empty text may not change too.

It's fairly difficult to write code that will change everything. We do have a (not free) addin that will find everything and change to any language if you do this a lot.

http://www.pptalchemy.co.uk/Real_Lingo.html

Stephpierre
11-02-2016, 01:23 AM
Hi John,

Thanks for this, I'm very interested. However as I am putting together my own toolbar, will I be able to add just the code to my existing toolbar, or will I require an additional toolbar just for Real Lingo?

John Wilson
11-02-2016, 01:24 PM
Real Lingo creates a new button in the Review Tab. Toolbars are really for use in pre 2007.

17485