Sharing Shortcuts
Q I've set up approximately 200 Excel AutoCorrect Shortcuts that represent various products and services offered by my company. What's the best way to transfer these Shortcuts to other systems so that my co-workers can use them? - Steve Edery A AutoCorrect, which debuted in Excel 95, can correct common spelling errors on the fly. As many users of Excel have discovered, you can also assign "shorthand Shortcuts" that expand to a longer sequence of characters. For example, you may define "awc" as an AutoCorrect Shortcut for "Amalgamated Widget Company." When you type awc into a cell, Excel will then replace it with the associated text string. You define and manage your Shortcuts by using the Tools-AutoCorrect command. Excel and all other Microsoft Office applications store AutoCorrect Shortcuts in a single .acl file in your Windows folder (the exact file name will vary). So changes you make from Excel, say, will be available in Word. However, there's no tool for manually editing the binary .acl file, and moving such a file from one system to another will invalidate your existing entries. The solution is to use a VBA macro to create the Shortcuts. Start Excel with a new workbook with one sheet, and then enter your Shortcuts and their associated text into Columns A and B, respectively. Enter as many as you like, beginning in Row 1, and don't include any blank rows between the entries. Save and name this worksheet. Caption: To share your AutoCorrect entries with colleagues, first create a Shortcut worksheet. In Excel 97, select Tools-Macro-Macros to display the Macros dialogue box. Type CreateShortcuts in the Macro Name field and click Create. Then enter the following macro into the VBA module, and press <Alt>-<F11> to return to Excel. (Note that in earlier versions of Excel, you have to select Insert-Module to insert a new VBA module sheet that will hold the code.) Sub CreateShortcuts()ItemCount = Application. _ CountA(Range("Sheet1!A:A")) For Row = 1 To ItemCount ShortText = Cells(Row, 1) LongText = Cells(Row, 2) Application.AutoCorrect. _ AddReplacement ShortText, LongText Next Row End Sub Save the workbook and distribute it to your co-workers. To add the AutoCorrect Shortcuts, open the workbook, select Tool-Macro-Macros, and then execute the CreateShortcuts macro. Be aware that existing Shortcuts with the same name will be overwritten without warning. - John Walkenbach |
Category:spreadsheet Issue: April 1999 |
These Web pages are produced by Australian PC World © 1999 IDG Communications