Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    AutoCorrect Entries (Word XP)

    I am migrating a client from WordPerfect to Word. This is a medical transcription company where the transcriptionists used the WordPerfect QuickCorrect feature to add up to about 3000 abbreviations. For example, "tp" would expand to "the patient," etc. As you can imagine, this is a valuable tool for medical transcriptionists and this feature also saves them the cost of a third-party shorthand program. I can get their lists out of WordPerfect, but is there any way to import words to the AutoCorrect feature in Word without having to re-enter them?

    Thanks, you guys are all brilliant!

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: AutoCorrect Entries (Word XP)

    There are a few "autocorrect mover" utilities available, one from Microsoft, one from the MVPs.org site's Word FAQ, and one I posted a couple years ago (see below). I believe that all use an intermediate table to store the entries in a Word document (this is certainly going to be necessary if any of these involve "rich text" rather than plain text).

    If you can extract the WP entries into a tab-separated text file or into a table, then it should be possible to use one of these movers to stuff them into a Word ACL file. Once you create the file, which might just be an enhanced default file MSO1033.ACL, you can duplicate that to other users' machines. Or you can give them all a "self-loader" if they already have saved their own AC entries.

    WARNING ABOUT MY CODE: This does not work for long or multi-paragraph autocorrects, but for short ones, it should be fine. You will only need the second one, but try both to get a sense for the table layout.
    <pre>Option Explicit
    Sub AutoCorrExtract()
    ' Copyright 2000 Jefferson F. Scher All Rights Reserved
    ' Created 5/22/2000; pulls .ACL entries into a document for uploading into another .ACL
    If MsgBox("Extract all current AutoCorrect entries into this blank document?", _
    vbQuestion + vbYesNo) <> vbYes Then Exit Sub

    Dim acEntry As AutoCorrectEntry
    For Each acEntry In Word.AutoCorrect.Entries
    With Selection
    .EndKey unit:=wdStory, Extend:=wdMove
    .TypeText acEntry.Name & vbTab & acEntry.Value
    .TypeParagraph
    End With
    Next
    With Selection
    .HomeKey unit:=wdStory, Extend:=wdExtend
    .ConvertToTable Separator:=wdSeparateByTabs
    End With
    MsgBox "Done!"
    End Sub
    ' - - - - - - - - - - - - - - - - - - - -
    Sub AutoCorrStuffer()
    ' Copyright 2000 Jefferson F. Scher All Rights Reserved
    ' Created 5/22/2000; stuffs .ACL entries from 2 column table into current .ACL
    If MsgBox("Stuff the entries in this 2 column table into your AutoCorrect file?", _
    vbQuestion + vbYesNo) <> vbYes Then Exit Sub

    Dim acTable As Table, acRow As Row, acName As String, acValue As String
    'Grab first table in document (or alert user if not found)
    On Error GoTo noTables
    Set acTable = ActiveDocument.Range.Tables(1)
    On Error GoTo 0

    'Check format of table
    If acTable.Columns.Count <> 2 Then
    MsgBox "The table should have exactly two columns. Left column abbreviation, " & _
    "right column what it expands into.", vbCritical
    Exit Sub
    End If

    For Each acRow In acTable.Rows
    'grab values
    acName = acRow.Cells(1).Range.Text
    acName = Left(acName, (Len(acName) - 2)) 'remove end-of-cell marker
    acValue = acRow.Cells(2).Range.Text
    acValue = Left(acValue, (Len(acValue) - 2)) 'remove end-of-cell marker
    'write to AutoCorrect List
    If acName <> vbNullString Then
    Word.AutoCorrect.Entries.Add Name:=acName, Value:=acValue
    StatusBar = "Added " & acName
    End If
    Next
    Exit Sub

    noTables:
    MsgBox "Error finding your table. If there isn't one, I no help you.", vbCritical
    End Sub</pre>

    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •