Word.Tips.Net WordTips (Menu Interface)

Toggling AutoCorrect Settings

Word includes a great feature that allows you to automatically streamline what you type. This feature, called AutoCorrect, automatically makes changes to what you type to fit specific rules that you select. For instance, you can cause Word to capitalize the first word of your sentences or automatically capitalize the names of days. (You can view your AutoCorrect settings by selecting AutoCorrect from the Tools menu.)

There are times when AutoCorrect can get in the way of what you are typing. This is particularly true if you are typing technical material. There is no "master switch" that allows you to turn off the AutoCorrect feature, however. Instead, you must display the dialog box and turn off each check box, in turn. When you later want it back on, you must go through the same process again.

The following macro can quickly turn off your AutoCorrect settings. When you run the macro a second time, the AutoCorrect settings are set back to their original values. The macro is designed to be added to a toolbar, and then you can click on the tool to change AutoCorrect.

Sub ToggleAC()
    Dim State As String
    Dim ACVal As Integer
    Dim VarPass As Variant
    Dim VarNum As Integer

    VarNum = 0
    For Each VarPass In ActiveDocument.Variables
        If VarPass.Name = "ACState" Then VarNum = VarPass.Index
    Next VarPass

    If VarNum <> 0 Then
        State = ActiveDocument.Variables.Item(VarNum).Value
        ACVal = Val(Mid$(State$, 1, 1))
        If ACVal <> 0 Then AutoCorrect.CorrectInitialCaps = True
        ACVal = Val(Mid$(State$, 2, 1))
        If ACVal <> 0 Then AutoCorrect.CorrectSentenceCaps = True
        ACVal = Val(Mid$(State$, 3, 1))
        If ACVal <> 0 Then AutoCorrect.CorrectDays = True
        ACVal = Val(Mid$(State$, 4, 1))
        If ACVal <> 0 Then AutoCorrect.CorrectCapsLock = True
        ACVal = Val(Mid$(State$, 5, 1))
        If ACVal <> 0 Then AutoCorrect.ReplaceText = True
        ACVal = Val(Mid$(State$, 6, 1))
        If ACVal <> 0 Then Options.AutoFormatAsYouTypeReplaceQuotes = True
        State = ""
        State = State & Mid(Str(Abs(AutoCorrect.CorrectInitialCaps)), 2)
        State = State & Mid(Str(Abs(AutoCorrect.CorrectSentenceCaps)), 2)
        State = State & Mid(Str(Abs(AutoCorrect.CorrectDays)), 2)
        State = State & Mid(Str(Abs(AutoCorrect.CorrectCapsLock)), 2)
        State = State & Mid(Str(Abs(AutoCorrect.ReplaceText)), 2)
        State = State & Mid(Str(Abs(Options.AutoFormatAsYouTypeReplaceQuotes)), 2)
        ActiveDocument.Variables.Add "ACState", State
        With AutoCorrect
            .CorrectInitialCaps = False
            .CorrectSentenceCaps = False
            .CorrectDays = False
            .CorrectCapsLock = False
            .ReplaceText = False
        End With
        Options.AutoFormatAsYouTypeReplaceQuotes = True
    End If
End Sub

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1738) applies to Microsoft Word 97, 2000, 2002, and 2003.

Related Tips:

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.