Word VBA How to change the language for a whole new document

Lauro Colasanti 121 Reputation points
2022-05-28T18:56:40.563+00:00

Hi,
I'm creating different Word Templates with VBA and for each one of them I would set a different language for the whole document.

I tried to use
ActiveDocument.Content.LanguageID = wdXXX
ActiveDocument.Range.LanguageID = wdXXX
without success can you help me, please?
Thanks, Lauro

Microsoft 365 and Office | Word | For business | Windows
{count} votes

Accepted answer
  1. Stefan Blom 3,376 Reputation points MVP Volunteer Moderator
    2022-05-29T16:47:57.247+00:00

    I recommend that you also modify the language of the Normal style. Try the following code (which is using wdEnglishUS as the language, but you can change that as necessary):

    Sub ModifyLanguageCurrentDoc()
    'Stefan Blom, MVP, May 2020
    ActiveDocument.Styles(wdStyleNormal).LanguageID = wdEnglishUS
    ActiveDocument.Content.LanguageID = wdEnglishUS
    End Sub
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.