I have drafted the following as a guide to others who might want to use this macro for the AutoCorrects. Please review and give me any criticisms or corrections.
Documentation of The Capability ofJay's .acl Backup and Restore Macro
The Form & Structure of the Backup File
The backup file is a Word document that consists of a Title Paragraph ("AutoCorrect Backup File" followed by a blank paragraph
A 3 Column Table follows. The first row of the table is a Header Row: "Name -- Value -- RTF". The Name is the string that is the Bad Word or the label for the sting that wil replace it. The third column is either "True" or "False". "True" denotes a formatted
string replacement. "False" is an unformatted Autocorrect entry. The "True" entries are stored in the "Normal" template. The "False" entries are stored in the .acl file. Most entries will be "False".
The File in Word That Holds the AutoCorrect Unformatted Entries
- The file in Word that contains the AutoCorrect, non-formatted entries has the extension .acl
- The first three characters of that file are always "MSO".
- The next 3 characters are 4 digits ####.
- The .acl extension follows
- The 4 digits represent the different language proofing tools that Word might use. The can differ with each personal installation of Office. American English is 1033. Therefore, the file storing the American English non-formatted AutoCorrect entries is:
"MSO1033.acl"
- There can be several of these .acl files in any PC if the user uses more than one language.
- The location of the .acl files is:
C:\Users*USER_NAME*\AppData\Roaming\Microsoft\Office
The USER_NAME is the name of the user of the PC at the moment. Many PCs are configured for more than a single user. Each user has his/her own set of .acl files.
- The Structure of the .acl files is very complex. They are Binary files and seem to be a variant of Binary Search Trees. This is the reason that inserting, deleting, and editing an entry is so fast and that the autocorrection operates so quickly and as
a practical matter does so regardless of the number of Autocorrect entries. The search, insert and delete
all operate at O(log n) time. You could have a million AutoCorrect entries and never notice the time delay.
- It is the consensus of all the developers with experience with the .acl files that you should NOT try to discern the structure of the extremely sophisticated file set. It is just too hard to fire it out, and Microsoft has never made the structure public,
Therefore it is too easy to mess up if you try and alter the files directly.
The Principle of the Macro
- The macro converts the .acl file into a Docx backup file. When you want to restore the .acl file, the Macro converts the Docx
- backup file back into the acl. file.
- The macro does not interact with the .acl file directly, so it does not have to deal with the very complex structure. The Macro uses the VBA Word commands.
Additional Uses of the Macro
You can use this Macro for MORE than just backing up and restoring the .acl file
- You can make corrections to the .docx backup AutoCorrect file in Word and those corrections will be reflected in MSO1033.acl file when restored.
- You can Delete existing AutoCorrects by deleting their corresponding rows in the .docx table.
- You can add new AutoCorrects by adding rows to the table, filling the first 2 columns of the row, with the bad word or label and the second column with the correct word or entry that the label describes. However, it is
critical that you also add a "True" or "False" to the third column to indicate whether the AutoCorrect is formatted or now. Most will be "False" for most users.
- If by any chance the AutoCorrects rows that you add to the table are duplicates of already existing rows, the Macro will only enter one and ignore the second.
- If you have two different corrections (2nd column) for the same bad word for the label (1st column), the
second one is the one that will remain after the conversion to the .acl file.
Use Cases For the Macro
In addition to the Backup and Restore functions here are some additional use cases for this macro.
- You have an .acl AutoCorrect file that has been developed in a company or other organization, and you want to distribute the AutoCorrect standard paragraphs and/or corrections to other in the organization.
- You have already distributed .acl files but want to make changes -- corrections, deletions and additions to all.
- Several people are using the same AutoCorrect files, but each of them has subsequently added personal AutoCorrects, You want to add new general changes but preserve the personal additions that each person has made.
- You want to aggregate the new autocorrects that several people have added and then review them all and distribute some that meet your criteria to all.
- You can transfer glossaries from the web, pdf, Word, or text documents to your autocorrects.
- The most common use case is when you have added a new autocorrect but have made an error and the .acl file has a large number of AutoCorrect entries, it is much easier and faster to make a backup copy, then find the error in the .docx table, correct it
and restore. There is no user search capability in the AutoCorrect operation in Word. At least that entries are listed in alphabetical order of the errors or labels. So scrolling down can find it, if there are not too many entries. But most often we remember
the correct word and not the incorrect word. With no search available and the correct words
NOT in alphabetical order, it is much easier (if there are more than a few autocorrects) to use the macro.