autocorrect entries from word 2003 to word 2010

autocorrect entries from word 2003 to word 2010

Postby stephen » Thu Sep 16, 2010 8:05 pm

How to transfer AutoCorrect entries from Office 2003 to Office 2010
http://social.answers.microsoft.com/Forums/en-US/officeprog/thread/56645e5a-720f-4b79-a964-b73577a1513d

Here are some macros in word create a new macro and paste the text below into the macros
in 2003 click tools Macro and run the SaveAutoCorrectEntries
and save the document created
on the Office 2010 PC open the document created from 2003 and then run
DelAllAutoCorrectEntries
then
LoadAutoCorrectEntries

Code: Select all
Sub SaveAutoCorrectEntries()
  Dim acEntry As AutoCorrectEntry
  For Each acEntry In AutoCorrect.Entries
    Selection.TypeText acEntry.Name & " " & acEntry.Value
    Selection.TypeParagraph
  Next
End Sub

Sub DelAllAutoCorrectEntries()
  Do While AutoCorrect.Entries.Count > 0
    AutoCorrect.Entries(1).Delete
  Loop
End Sub

Sub LoadAutoCorrectEntries()
  Dim Data, I As Long, J As Long
  Dim aName As String, aValue As String
  Data = Split(ActiveDocument.Range(Start:=0, End:=Selection.End), vbCr)
  For I = 0 To UBound(Data)
    J = InStr(1, Data(I), " ")
    If J > 0 Then
      aName = Left$(Data(I), J - 1)
      aValue = Mid$(Data(I), J + 1)
      'Debug.Print aName, aValue
      AutoCorrect.Entries.Add aName, aValue
    End If
  Next
End Sub
stephen
 
Posts: 507
Joined: Thu Feb 09, 2006 9:37 am
Location: Brisbane

Return to Microsoft Office

Who is online

Users browsing this forum: No registered users and 1 guest

cron