|
|
|
|
|
|
|
|
Word
|
List all AutoCorrect entries in new document
|
|
|
Ease of Use
|
Easy
|
|
Version tested with
|
2000, 2002, 2003
|
|
Submitted by:
|
MOS MASTER
|
|
Description:
|
The sub will add a new document with a list of all AutoCorrect entries.
|
|
Discussion:
|
It's very easy to add a new AutoCorrect entry, but sometimes you forget which ones you've already got. This sample will make a quick list for you to compare.
|
|
Code:
|
instructions for use
|
Option Explicit
Sub ListAutoCorrect()
Dim oEntry As Word.AutoCorrectEntry
With Application
' \\ Turn screenupdating off
.ScreenUpdating = False
' \\ Add new document
.Documents.Add
' \\ Loop through all AutoCorrect entries
For Each oEntry In AutoCorrect.Entries
' \\ Work with selection
With .Selection
' \\ Make all AutoCorrect names Bold
.Font.Bold = True
.TypeText Text:=oEntry.Name
.TypeParagraph ' \\ Insert Para
' \\ Turn of Bold for the AutoCorrect values
.Font.Bold = False
' \\ Insert entry
.TypeText Text:=oEntry.Value
' \\ Insert two paragraphs
.TypeParagraph
.TypeParagraph
End With
Next
' \\ Turn screenupdating back on
.ScreenUpdating = True
End With
End Sub
|
|
How to use:
|
- Open your Word document.
- Press Alt + F11 to open VBE.
- Insert-Module. (Insert -> module)
- Paste the code there in the window at right. (F7)
- Close VBE (Alt + Q or press the X in the top right hand corner).
- Save the file.
|
|
Test the code:
|
- From Word, press Alt + F8 to open the macro dialog box.
- Select ListAutoCorrect
- Click Run.
|
|
Sample File:
|
List Autocorrect entries.zip 7.57KB
|
|
Approved by mdmackillop
|
|
This entry has been viewed 44 times.
|
|
|