Changing language of textboxes

S

Steve Barber

I regularly receive documents from French colleagues - The first job I have
to do is check their spelling. I have a macro that will select all the text
and tables and change their language setting to wdEnglishUK it will not,
however, cope with text boxes can anyone tell me (with code example please)
how to achieve this?

Many thanks in advance
 
J

Jay Freedman

I regularly receive documents from French colleagues - The first job I have
to do is check their spelling. I have a macro that will select all the text
and tables and change their language setting to wdEnglishUK it will not,
however, cope with text boxes can anyone tell me (with code example please)
how to achieve this?

Many thanks in advance

Hi Steve,

Add this code to your macro:

Dim oTB As Shape
For Each oTB In ActiveDocument.Shapes
If oTB.Type = msoTextBox Then
oTB.TextFrame.TextRange.LanguageID = wdEnglishUK
End If
Next oTB
 
Top