Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #31  
Old Yesterday, 10:23 AM
Charles Kenyon Charles Kenyon is offline I can't change US English to UK English in Word Windows 11 I can't change US English to UK English in Word Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,470
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Thank you Andrew. I hope it helps Metta. It works for me here.
I've added a link to this thread in my article on the Microsoft Answers site: Proofing Language Keeps Changing - Solutions - How can I keep my proofing language from changing?
That article also contains code to change paragraph, character, and linked styles.

I keep a repository of code snippets in my Normal.dotm. I've added your macro to my own repository of code, I added some comments.
Code:
Sub SetLanguage()
  ' Changes all content and styles in the document to UK English spelling
  ' Andrew Lockton  2025-June-18
  ' https://www.msofficeforums.com/186297-post30.html
  '
  ' Only handles main story but also handles styles
  ' Does not change language in a blank document, needs some text
  '
  Dim aStyle As Style, iLingua As Integer
  ' Pick a language constant - this is set for English UK
  '   Language IDs https://docs.microsoft.com/en-us/office/vba/api/word.wdlanguageid
  '
  iLingua = wdEnglishUK
  '
  ' CYCLE THROUGH PARAGRAPH STYLES AND SET LANGUAGE
  For Each aStyle In ActiveDocument.Styles
    If aStyle.Type = wdStyleTypeParagraph Then
      aStyle.LanguageID = iLingua
    End If
  Next aStyle
  ' APPLY LANGUAGE TO TEXT ALREADY IN DOCUMENT MAIN LAYER
  ' SET TEXT AS NOT CHECED YET
  ' TURN OFF ANY SETTING TO NOT CHECK SPELLING AND GRAMMAR
  '
  With ActiveDocument
    .range.LanguageID = iLingua
    .range.NoProofing = False
    .SpellingChecked = False
    .GrammarChecked = False
    '.CheckSpelling ' CAN TURN THIS ON BY REMOVING FIRST COMMENT APOSTROPHE
  End With
  '
  ' CLEAR LIST OF WORDS PREVIOUSLY SET TO BE IGNORED DURING A SPELL CHECK
  Application.ResetIgnoreAll
End Sub
Private Sub StyleEnglishUK()
    '   Written 21 March 2018
    '   Charles Kenyon
    '   Intended to set all styles to EnglishUK, proofing, not automatitically update
    '   Language IDs https://docs.microsoft.com/en-us/office/vba/api/word.wdlanguageid
    '
    Dim aStyle As Style
    On Error Resume Next    ' Some styles have no language attribute and will give an error
    For Each aStyle In ActiveDocument.Styles
        Select Case aStyle.NameLocal
            Case "TOC 1", "TOC 2", "TOC 3", "TOC 4", "TOC 5", "TOC 6", "TOC 7", "TOC 8", "TOC 9", _
                 "Table of Figures", "Table of Authorities"
                Let aStyle.AutomaticallyUpdate = True
            Case Else
                Let aStyle.AutomaticallyUpdate = False
        End Select
        Let aStyle.LanguageID = wdEnglishUK
        Let aStyle.NoProofing = False
    Next aStyle
    Let ActiveDocument.UpdateStylesOnOpen = False    ' For information on using this line, see:
    '       http://www.shaunakelly.com/word/sharing/willmyformatchange.html
    On Error GoTo -1
End Sub
Note, I do not believe either of our macros will change the language in a blank document if the Windows language is set to be something different. There must be some text in the document. To set it for a new blank document requires a complex workaround.
Reply With Quote
  #32  
Old Yesterday, 02:35 PM
Metta Metta is offline I can't change US English to UK English in Word Windows 11 I can't change US English to UK English in Word Office 2016
Novice
I can't change US English to UK English in Word
 
Join Date: May 2025
Posts: 17
Metta is on a distinguished road
Default I can't change US English to UK English in Word

Thank you Guessed and Charles Kenyon for all your help. I have kept the last code snippet you sent me and tried it. It ran through word with no syntax errors showing up, but it didn't do anything to change the US English to UK English. I also keep any code snippets I come across that are useful to me. I know very little about using computers, and macros are new to me. I tried to explain where the syntax errors occurred on the original macro Charles sent me, lines 2 and 19, because the print screen button on my lap top didn't take a photo shot of my screen for me to send.
Metta
Reply With Quote
  #33  
Old Yesterday, 09:41 PM
Charles Kenyon Charles Kenyon is offline I can't change US English to UK English in Word Windows 11 I can't change US English to UK English in Word Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,470
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You could always download a trial copy of Snagit from Techsmith.


Neither macro will change the language settings at the cursor of a blank document.
Reply With Quote
  #34  
Old Today, 03:59 AM
Italophile Italophile is offline I can't change US English to UK English in Word Windows 11 I can't change US English to UK English in Word Office 2021
Expert
 
Join Date: Mar 2022
Posts: 541
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Quote:
Originally Posted by Metta View Post
the print screen button on my lap top didn't take a photo shot of my screen for me to send.
Just use the Windows Snipping Tool which can be launched with the shortcut Windows + Shift + S
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
I can't change US English to UK English in Word Change to English Tmes New Roman from Font: 10 pt, (Asian) Japanese, Indent: KDuncan Word 1 01-16-2025 10:25 PM
Not Changing Fonts From English to Non-English. mohsen.amiri Word 0 07-31-2017 01:38 AM
Finding Non-English Words in an English and Non-English words document mohsen.amiri Word 3 03-31-2015 11:20 PM
Word version doesn't have US English. traumatiziert Word 1 04-20-2012 02:20 AM
I can't change US English to UK English in Word Change Language From Dutch To English tutwelve Office 7 08-20-2005 07:55 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:54 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft