Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-30-2020, 09:34 AM
Charles Kenyon Charles Kenyon is offline Proofing language for one template Windows 10 Proofing language for one template Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
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

Try the attached.



I ran the following macro:
Code:
Sub StyleEnglishCanadian()
'   Written 21 April  2018
'   Charles Kenyon
'   Intended to set all styles to EnglishCanadian, 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"
                Let aStyle.AutomaticallyUpdate = True
            Case Else
                Let aStyle.AutomaticallyUpdate = False
        End Select
        Let aStyle.LanguageID = wdEnglishCanadian
        Let aStyle.NoProofing = False
    Next aStyle
    ActiveDocument.UpdateStylesOnOpen = False ' For information on using this line, see:
'       http://www.shaunakelly.com/word/sharing/willmyformatchange.html
    On Error GoTo -1
End Sub
Attached Files
File Type: dotx Macro text MS Template.dotx (61.1 KB, 7 views)
Reply With Quote
  #2  
Old 07-30-2020, 10:02 AM
Ulodesk Ulodesk is offline Proofing language for one template Windows 10 Proofing language for one template Office 2016
Word 2013 Expert Cert
Proofing language for one template
 
Join Date: Sep 2009
Location: Virginia
Posts: 872
Ulodesk is on a distinguished road
Default Template

Thank you again. As far as I can see, you are getting the same result as I did, with both US and Canada at the top of the proofing languages dialogue but with Canada selected, except that yours seems to hold. What's interesting is that, when I copied the macro, installed it, and ran it in the copy I sent you, it behaved as before, effective until; I closed and reopened the document.

Well, I'll start with yours, replace the data I had removed from it, and see how things go.

As always, I appreciate your generous assistance.

Philip
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Proofing Language Changes do Not Take Effect Andrew H Word 8 01-03-2018 07:32 AM
Proofing language for one template Proofing language issues kiyap Word 3 10-01-2016 08:24 AM
Can't set proofing language Mayda89 PowerPoint 3 01-28-2016 11:00 AM
Proofing language for one template Adding German as proofing language M. Dino Word 1 11-14-2014 04:19 PM
Proofing language for one template proofing language wont change BigOldArt Word 2 01-18-2013 01:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:21 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