Share via

How to back-up AutoCorrect?

Anonymous
2011-08-21T23:01:27+00:00

I'm using Word:Mac 2011 and I would like to know how to back up (and to restore properly) my vast AutoCorrect list, and if it is a different file in a different place, requiring a different procedure, my dictionary, too.

Thanks in advance

MT

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-08-24T03:10:17+00:00

My bad ... the ACL files are in ~/Library/Preferences/Microsoft/Office 2011

Also here is a VBA routine that copies all of your unformatted AC entries and puts them into a Word document table that can be restored with a second VBA subroutine that I'm finishing up.

Depending on how many AC entries you have, it takes a couple of minutes to run so just wait on it.

Sub autoCorrectBackup()

   'Copyright (c) 2011, Richard V. Michaels. All rights reserved.

   'You have the right to use it ... please just don't claim that you wrote it!

    On Error GoTo ErrMsg

    Dim doc As Word.Document

    Dim rng As Word.Range

    Dim acEnt As Word.AutoCorrectEntry

    Dim acEntries As Word.AutoCorrectEntries

    Dim mName As String: mName = "Autocorrect Backup"

    Word.Documents.Add

    With Dialogs.Item(wdDialogFileSaveAs)

        .Name = Word.Options.DefaultFilePath(wdDocumentsPath) & ":Autocorrect_Backup_" & Date$

        If .Show <> -1 Then

            MsgBox "User Aborted Save, Exiting Backup", vbExclamation, mName

            Exit Sub

        End If

        .Execute

    End With

    Set doc = Word.ActiveDocument

    Set rng = Word.Selection.Range

    Set acEntries = Word.AutoCorrect.Entries

    For Each acEnt In acEntries

        rng.Text = acEnt.Name & vbTab & acEnt.value & vbCr

        rng.Collapse Word.WdCollapseDirection.wdCollapseEnd

    Next acEnt

    Set rng = doc.Content

    rng.ConvertToTable Separator:=Word.wdSeparateByTabs

    doc.Variables.Add Name:="ACbackup", value:="1"

    doc.Save

    MsgBox "Autocorrect Entry Backup Complete", vbOKOnly, mName

    Exit Sub

ErrMsg:

    MsgBox "Error: " & Err.Description, vbCritical, mName

End Sub

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2011-08-24T12:35:56+00:00

Here's the companion Restore routine.

Sub autoCorrectRestore()

   'Copyright (c) 2011, Richard V. Michaels. All rights reserved.

   'You have the right to use it ... please just don't claim that you wrote it!

    On Error GoTo ErrMsg

    Dim doc As Word.Document

    Dim rng As Word.Range

    Dim iRng As Word.Range

    Dim vRng As Word.Range

    Dim tbl As Word.Table

    Dim var As Word.Variable

    Dim bFound, bValid As Boolean

    Dim cntr, rCnt, r, x As Integer

    Dim acEnt As Word.AutoCorrectEntry

    Dim acEntries As Word.AutoCorrectEntries

    Dim mName As String: mName = "Autocorrect Restore"

    With Dialogs.Item(wdDialogFileOpen)

        .Name = Word.Options.DefaultFilePath(wdDocumentsPath)

        If .Show <> -1 Then

            MsgBox "User Aborted File Open, Exiting Restore", vbExclamation, mName

            Exit Sub

        End If

        .Execute

    End With

    Set doc = Word.ActiveDocument

    Set rng = Word.Selection.Range

    Set acEntries = Word.AutoCorrect.Entries

    bFound = False

    bValid = True

    For Each var In doc.Variables

        If var.Name = "ACbackup" Then bFound = True

    Next var

    If doc.Tables.count <> 1 Then bValid = False

    If bFound = False And bValid = False Then

        MsgBox "Invalid Backup Document", vbCritical, mName

        Exit Sub

    End If

    x = acEntries.count

    Dim acArray() As String

    ReDim acArray(x)

    x = 0

    For Each acEnt In acEntries

        acArray(x) = acEnt.Name

        x = x + 1

    Next acEnt

    Dim para As Word.Paragraph

    cntr = 0

    Dim str() As String

    Set rng = doc.Tables(1).Range

    rng.Rows.ConvertToText Separator:=Word.wdSeparateByTabs

    For Each para In rng.Paragraphs

        Set iRng = para.Range

        iRng.MoveEnd unit:=Word.wdCharacter, count:=-1

        str = Split(iRng.Text, vbTab)

        If str(0) = "" Then GoTo SkipItem

        For x = 0 To acEntries.count - 1

            If acArray(x) = str(0) Then GoTo SkipItem

        Next x

        acEntries.Add str(0), str(1)

        cntr = cntr + 1

        x = acEntries.count

        ReDim acArray(x)

        acArray(x) = str(0)

SkipItem:

    Next para

    rng.ConvertToTable Separator:=Word.wdSeparateByTabs

    MsgBox "Autocorrect Entry Restore Complete" & vbCr & _

            "Added " & cntr & " AC entries.", vbOKOnly, mName

    Exit Sub

ErrMsg:

    MsgBox "Error: " & Err.Description, vbCritical, mName

End Sub

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

Answer accepted by question author

Anonymous
2015-02-26T09:54:22+00:00

Sure they exist, you just are not seeing them. Since this thread started, Apple made the Library folder hidden. To see it, go to the Finder, press Option and click Go. Or select Go to Folder and paste this in the blank field:

~/Library/Preferences/Microsoft/Office 2011

Also, you can unhide it permanently by  going to your home folder, selecting View > Show View Options and enabling Show Library Folder

Was this answer helpful?

0 comments No comments

15 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-08-22T13:55:23+00:00

    Your custom dictionary and your autocorrect list files are in this folder, which you should backup:

    ~/Library/Application Support/Preferences/Microsoft/Office 2011

    In my subdirectories, interestingly, it looks like this:

    ~/Library/Application Support/PreferenceSync/PreferenceSync.db

    OR

    ~/Library/Application Support/Microsoft/Office/... 

    and then, among other things, User Templates, My Templates, etc.

    I see nothing that leads me to ~/Preferences/Microsoft/Office 2011. Odd. That makes me even more nervous. I started building this AutoCorrect back in the 2004 version, it followed me to the 2008 version, and now I'm using it in 2011. Could the file therefore be elsewhere?

    Thanks again

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-08-22T13:40:14+00:00

    Your custom dictionary and your autocorrect list files are in this folder, which you should backup:

    ~/Library/Application Support/Preferences/Microsoft/Office 2011

    The other file to backup is your normal template and it is located here:

    ~/Library/Application Support/Microsoft/Office/User Templates/Normal.dotm

    And then if you have any custom templates of your own you should backup this folder:

    ~/Library/Application Support/Microsoft/Office/User Templates/My Templates

    One final thing to add about these files and folders. Sometimes if a corruption occurs in Office you might get a recommendation to trash your Offic Preferences or even trash your Normal template. For many users that's not an issue because they may not have valuable Autocorrect entries stored or custom macros in their Normal template. However, for others like yourself this could be devastating so be careful.  If you have to rebuild your system, use your backup and selectively restore the Language ACL files (Auto Correct List files), your Custom Dictionary, and the macros from your backed up Normal template.

    Was this answer helpful?

    0 comments No comments