The Anchorage
Personal website of Gregory K. Maxey, Commander USN (Retired)
The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.
However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.
If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!
The purpose of this Microsoft Word Tips & Microsoft Word Help page is to provide and publish AutoCorrect Utility Manager (ACUM); a simple utility for adding, deleting, redefining Word AutoCorrect entries and to facilitate AutoCorrect entry backup, restore and transfer.
I've had some simple code published here for several years as well: AutoCorrect Generator
I decided to expand the project after an immigration judge friend and fellow VBA enthusiast shared some of his code with me. He had done some interesting things with his code and I wanted to expand on it here.
Word ships with over 900 pre-defined AutoCorrect entries. Over time users who are familiar with the AutoCorrect utility create many more custom AutoCorrect entries for their personal use.
The pre-defined and user defined AutoCorrect entries can be in one of two forms or types. Plain text entries are stored in the user's regional language AutoCorrect List (*.acl) file. For example the *.acl file for U.S. English is MSO1033.acl and is typically located in the user's roaming profile folder. Formatted entries are stored in the user's Normal template.
While both the AutoCorrect List file and Normal template can be backed up, they can be difficult to locate especially when protected and operation system files are hidden, and they can become corrupt.
Corrupt files are easily repaired, but in so doing, any custom AutoCorrect entries that you create are lost.
With ACUM, you can easily create a master list of AutoCorrect entries and restore those entries to your AutoCorrect List and Normal template file when required.
The AutoCorrect Utility Manager (ACUM) is a Word template format file containing a custom ribbon tab and a preformatted landscape format Shortcut Definition Table (SDT). When a document is created using the template, users will see a "ACUM" ribbon tab and SDT similar to the illustrations shown below:
The Shortcut Definition Table can provide a complete listing of existing AutoCorrect entries defined in Word, and be used to add, redefine, delete, backup, restore or transfer AutoCorrect entries.
The SDT consists of a heading row and one or more Shortcut Definition Rows (SDR). Each row contains four columns. For each SDR:
Notes:
1. Do not delete or relocate the Shortcut Definition Table.
2. Delete the sample Shortcut Definition Row prior to first use.
Using the "Import from Word" button command you can import all of your plain text and formatted AutoCorrect entries into the SDT. You can then save the file as a backup of your AutoCorrect entries or simply continue and use the imported list as your AutoCorrect Manager Utility file.
Note: The Import from Word utility is primarily designed for first use when creating a backup file or after resetting and clearing the SDT. Importing from Word when the SDT contains one or more SDRs increases the likelihood of having validation errors (e.g., duplicate shortcuts) during processing.
To add a plain text or formatted SDR and later create a corresponding AutoCorrect entry, click the "Add Plain Text Short" or "Add Formatted Shortcut." A new SDR is inserted or appended in the SDT and you simply enter the unique shortcut and AutoText replacement. After you have added one or more SDRs, click the ribbon "Create/Redefine Shortcuts" button control.
To redefine an existing AutoCorrect entry, find the SDR associated with the entry you want to redefine and change the AutoCorrect replacement value. Then change the status code in column 4 from Processed to Create. After adding or redefining one or more SDRs, click the ribbon "Create/Redefine Shortcuts" button control.
To delete one or more SDRs and associated AutoCorrect entries, select one or more SDRs to delete and click the ribbon "Delete Shortcut(s)" button control.
To reset the SDT, click the ribbon "Reset Definition Table" button control. Resetting the SDT deletes all SDRs. This action has no affect on the associated AutoCorrect entries and is intended primarily for when you want to import AutoCorrect entries from Word to create a new backup file or baseline SDT.
Using the ribbon "Sort by Shortcut" or "Sort by Phrase" button controls, you can sort the SDT by shortcut or defined AutoCorrect value.
When SDRs are added the SDR status column is automatically marked "Create." After processing or when imported from Word, SDRs are automatically marked "Processed." Changing an SDR type will automatically reset the Action/Status indicator to "Create" after the user tabs or clicks out of the type content control.
When processing the SDT is first validated. Validation ensures that a unique shortcut is defined in column 2 for each SDR, SDRs marked Plain Text do not contain a table or other object in column 3 and that data is provided in the remaining columns. Invalid SDRs are flagged with shading to highlight user actions required.
Note: The SDT must be validated before processing can be completed.
The ribbon "Mark All for Processing" or "Mark All Processed" button controls can be used to globally replace status markings in the SDT.
Note: When restoring or transferring AutoCorrect entries, all the SDRs you want to restore or transfer must be marked with "Create" in the SDR status column. Otherwise the SDR is skipped during processing.
After opening the AutoCorrect Utility Manager template file or a file previously saved as a backup, and after making any changes to the SDT, you are ready for processing. To process the SDT, click the ribbon "Create/Redefine Entries" button control. The processor will automatically validate the SDT. If validation passes, processing will automatically begin. Progress bars indicate the status of validation and processing.
When processing is complete, a notification message displays.
While processing if an AutoCorrect entry is detected with a shortcut trigger that matches the shortcut defined in the SDR the user is alerted and must decide to overwrite and redefine the AutoCorrect entry or skip it.
If the SDT does not validate, the invalid SDRs are flagged for user action and a notification is displayed.
Note: The ACUM only flags Plain Text type errors and only if a table or other object (e.g., chart, drawing, textbox etc.) is detected in column 3.
As shown above, duplicate shortcuts will not validate and will prevent further processing. To minimize the likelihood of creating SDRs with a duplicate shortcut, importing from Word should normally only be done after the SDT has been reset (contains only the header row).
When importing from Word the ACUM first appends rows to the SDT. This process may take a few seconds depending on your processor speed and number of AutoCorrect entries you have defined. After the necessary number of rows are added and formatted, then the import begins.
The process of importing is indicated by progress bars.
The following is suggested for getting the most usefulness from the ACUM.
For more on template add-ins and how to load them, see Organizing Your Macros/Template Add-ins at: Installing Macros
Notes:
1. This tips page, illustrations and examples were developed using Word 2010. The ACUM template is fully functional with Word 2007/2010/2013.
2. Due to changes in the Word 2013 object model, many VBA processes run noticeably slower than in previous Word versions. You can increase the speed of the import process by using the draft layout mode (View>Views>Draft)
Special thanks to Word MVP Jay Freedman for his technical review and evaluation of this project.
That's it! I hope you enjoy using AutoCorrect Utility Manager. You can download the template here: AutoCorrect Utility Manager.
The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.
However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.
If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!