Article ID: 181180
Article Last Modified on 1/22/2007
Sub InsertAutoCorrectEntries()
Dim ACE As AutoCorrectEntry
' Create new document.
Documents.Add
' Iterate through AutoCorrect entries.
For Each ACE In Application.AutoCorrect.Entries
' Insert each entry name and its value on a new line.
Selection.TypeText ACE.Name & vbTab & ACE.Value & " " & vbCr
Next
' Format document for three columns.
With ActiveDocument.PageSetup.TextColumns
.SetCount NumColumns:=3
.EvenlySpaced = True
.LineBetween = True
.Width = InchesToPoints(1.67)
.Spacing = InchesToPoints(0.5)
End With
' Set TabStop for all three columns.
ActiveDocument.Paragraphs.TabStops(InchesToPoints(0.88)).Position = _
InchesToPoints(0.88)
End Sub
For additional information, please see the following article in the
Microsoft Knowledge Base:
173707 OFF97: How to Run Sample Code from Knowledge Base Articles
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: wordcon kbmacro vba
Keywords: kbdtacode kbinfo KB181180