View Single Post
 
Old 07-30-2020, 09:34 AM
Charles Kenyon Charles Kenyon is offline Windows 10 Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,081
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, 5 views)
Reply With Quote