How to set default language for all text and object in DOCX file.

J

Jan Kratochvil

I have to review a large DOCX file. This file was translated and the
translator left lots of text fields in drawing canvas and other places in
wrong language.

Is there any possibility how to set in Word all the text to one language?
Ctrl+A does not works for all objects.

My document must be in German and I have some German text set as Czech or
English.
 
G

Graham Mayor

It is much the same process as updating fields in story ranges. The
following should work

Sub German()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.LanguageID = wdGerman
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.LanguageID = wdGerman
Wend
End If
Next oStory
Set oStory = Nothing
End Sub

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top