Ok, here goes - but bear in mind i'm using a later version of word so can't be sure the prompts will work the same. What we are trying to do is insert a visual basic function into a macro.
open a blank document - this should be based on the template you want the entries from - in most cases this would be Normal.dot
Click Tools, Macro, Macros, put in a 'macro name' eg: GetCorrect (avoid using 'auto' in the name), in the 'macros in' box choose 'This document
Click Creat
NB: - I'm working on word 2002 so the following may be entirely different for you
Complicated Visual Basic screen appears which you can mostly ignor
the window you do care about should look something like this
Sub acorrect(
' acorrect Macr
' Macro created 26/02/2004 by yo
End Su
Click AFTER the End Su
Past the code in (whilst silently acknowledging the lord Bills copyright and accepting the EULA
'>>>>>>>>>>>> start of cod
'****** GetAutoCorrectEntries() *****
' Inserts each AutoCorrect entry into a Word document including the Value and whethe
' 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 entr
' 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 Intege
Dim TotalACEntries As Intege
TotalACEntries = Application.AutoCorrect.Entries.Coun
For x = 1 To TotalACEntrie
With Selectio
.TypeText Text:=Application.AutoCorrect.Entries.Item(x).Nam
.TypeText vbTa
'check for formatting and insert RTF text if necessar
If Application.AutoCorrect.Entries.Item(x).RichText = True The
Application.AutoCorrect.Entries(x).Apply Range:=Selection.Rang
Els
.TypeText Text:=Application.AutoCorrect.Entries.Item(x).Valu
End I
.TypeText vbTa
.TypeText Text:=Application.AutoCorrect.Entries.Item(x).RichTex
.TypeParagrap
End Wit
'update status ba
Application.StatusBar = StatMsg1 & x & StatMsg2 & TotalACEntrie
Next
' convert to tabl
Application.StatusBar = StatMsg
Selection.HomeKey Unit:=wdStory, Extend:=wdExten
Selection.ConvertToTable Separator:=wdSeparateByTabs, NumColumns:=
' add row headin
With Selectio
.MoveUp Unit:=wdLine, Count:=
.InsertRows
.TypeText Text:="Name
.MoveRight Unit:=wdCel
.TypeText Text:="Value
.MoveRight Unit:=wdCel
.TypeText Text:="RTF
.HomeKey Unit:=wdStor
End Wit
'Selection.GoTo What:=wdGoToPage, Which:=wdGoToNex
'Selection.InsertBreak Type:=wdPageBrea
End Functio
'>>>>>>>>> end of cod
Press Run - Button on the menu bar like a VCR playe
Word should hum for a while and then you can close visual basic and, assuming no errors, you will have a document containing all your auto-correct
Re