How to save my auto-corrects

D

DeeDeeCee

I've built up a large collection of customized auto-corrects in Word 2007. I
use them constantly. I'm going to be buying another computer in a few months
and would really like to avoid the laborious work of typing and entering all
my auto-corrects over again. They must be stored somewhere for the computer
to access them. Is there any way to copy the file of stored auto-corrects and
simply paste it into the right location on my new computer? Thanks.


ddc
 
J

Jay Freedman

I've built up a large collection of customized auto-corrects in Word 2007. I
use them constantly. I'm going to be buying another computer in a few months
and would really like to avoid the laborious work of typing and entering all
my auto-corrects over again. They must be stored somewhere for the computer
to access them. Is there any way to copy the file of stored auto-corrects and
simply paste it into the right location on my new computer? Thanks.


ddc

It isn't that simple, because AutoCorrect entries are split between at least two
different files depending on whether they're formatted or plain text, and
whether they're formatted in more than one language. You can use a utility to
copy them all into a document that can then be loaded on the new computer.

Download http://jay-freedman.info/AutoCorrect2007.zip and unzip the template
from it into your Templates folder. Double-click the template to open it in
Word, and follow the instructions on the screen. Do the Backup step on the old
computer and the Restore step on the new computer.
 
D

DeeDeeCee

This looks extraordinarily cool. I wish I had the know-how to write
applications and embed them in a document. One thing, though, when I clicked
on "Backup" after downloading the application/doc, it indicates there is some
kind of error that needs debuging. I'm going to describe it for you, in case
that is useful to you for your program. I don't expect you do to anything as
far as solving this thing on my computer; it might just be something on my
system that's causing the problem. Anyway, FYI:

Visual basic popped up with this message:
"Run time error '91': Object variable or With block variable not set.

I don't know visual basic, so I hit debug, and it showed the code with a
part-highlighted. This baffled me, so I simply closed out. And when I did,
there was a table with a bunch of my autocorrects. But there were about 200
lines that were empty, so I'm wondering if the error interrupted the process
and that's what the lines represent. Here is the part that VB editor showed
with some highlighting (the highlighted portion is indicated by
">>>>>>>>>>>>>" a few lines before End Run, and the snippet was
MyRange.Collapse:

'****** GetAutoCorrectEntries() ******
'
' Inserts each AutoCorrect entry into a Word document including the Value
and whether
' or not it is to include formatting. Name is the current name of the entry,
' Value is the text value of the entry, and RTF is a Boolean that is True if
the entry
' has "formatted text" checked. Then converts the text into a table and
adds a heading row to the table.
'
' x is used to loop through the AutoCorrect entries.
' TotalACEntries is the number of AC entries.

Private Function GetAutoCorrectEntries()

Dim x As Long
Dim TotalACEntries As Long
Dim oRow As Row, MyRange As Range, oTable As Table, TestRange As Range

TotalACEntries = Application.Autocorrect.Entries.Count

Set oTable = ActiveDocument.Tables.Add(Range:=Selection.Range, _
NumRows:=(TotalACEntries + 1), NumColumns:=3)

Set MyRange = oTable.Cell(1, 1).Range
MyRange.Collapse
MyRange.Text = "Name"
Set MyRange = MyRange.Next(wdCell)
MyRange.Collapse
MyRange.Text = "Value"
Set MyRange = MyRange.Next(wdCell)
MyRange.Collapse
MyRange.Text = "RTF"
Set MyRange = MyRange.Next(wdCell)
MyRange.Collapse

For x = 1 To TotalACEntries

MyRange.Text = Application.Autocorrect.Entries(x).Name

Set MyRange = MyRange.Next(wdCell)
MyRange.Collapse

'check for formatting and insert RTF text if necessary
If Application.Autocorrect.Entries(x).RichText = True Then
Application.Autocorrect.Entries(x).Apply Range:=MyRange
Else
MyRange.Text = Application.Autocorrect.Entries(x).Value
End If

If Len(MyRange.Cells(1).Range.Text) = 2 Then
'if the autocorrect entry was a table, the current cell will be empty
Set MyRange = MyRange.Tables(1).Range
MyRange.Collapse wdCollapseEnd
End If

Set MyRange = MyRange.Next(wdCell)
MyRange.Collapse

MyRange.Text = Application.Autocorrect.Entries(x).RichText

If x < TotalACEntries Then
Set MyRange = MyRange.Next(wdCell)End If

'update status bar
Application.StatusBar = "Adding AutoCorrect Entry: " & x & " of " &
TotalACEntries

Next x

Set MyRange = Nothing
ActiveDocument.Range(0, 0).Select

End Function
___________________________________________________________

Anyway, thanks for your information. I will still try to use this when I
transfer.
 
J

Jay Freedman

I'm sorry to hear about your problem. It's probably the result of something in
one of your AutoCorrect entries that isn't being correctly handled by the code.
I'd like to take a look at the document the macro created to see if I can figure
out what that was. If you would be so kind, please email a copy of the document
to me -- my address is in the profile you can see by clicking my name above, or
you can get it from http://jay-freedman.info/contact/contact.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top