Class AutoCorrectEntry (Word VBA)

The class AutoCorrectEntry represents a single AutoCorrect entry. The AutoCorrectEntry object is a member of the AutoCorrectEntries collection. The AutoCorrectEntries collection includes the entries in the AutoCorrect dialog box.

The main procedures of class AutoCorrectEntry are AutoCorrectEntries.Add, AutoCorrectEntries.AddRichText and Delete

Set

To use a AutoCorrectEntry class variable it first needs to be instantiated, for example

Dim ace as AutoCorrectEntry
Set ace = AutoCorrect.Entries(Index:=1)

The following procedures can be used to set variables of type AutoCorrectEntry: AutoCorrect.Entries, AutoCorrectEntries.Add, AutoCorrectEntries.Item and AutoCorrectEntries.AddRichText

For Each

Here is an example of processing the AutoCorrectEntry items in a collection.

Dim aceEntry As AutoCorrectEntry
For Each aceEntry In AutoCorrect.Entries
	
Next aceEntry

Themes

The following procedures in this class have been grouped together and are described on a separate theme page

Add with its procedures AutoCorrectEntries.Add and AutoCorrectEntries.AddRichText

Methods

These are the main methods of the AutoCorrectEntry class

Delete - Deletes the specified AutoCorrect entry.

AutoCorrect.Entries(1).Delete

Properties

AutoCorrectEntries.Count returns the number of items in the AutoCorrectEntries collection.

Dim lngCount As Long
lngCount = AutoCorrect.Entries.Count

AutoCorrectEntries.Parent returns an object that represents the parent object of the specified AutoCorrectEntries collection, which is usually an AutoCorrect object.

Dim objParent As Object
Set objParent = AutoCorrect.Entries.Parent

Index returns a Long that represents the position of an item in a collection.

Dim lngIndex As Long
lngIndex = AutoCorrect.Entries(1).Index

Name returns or sets the name of the specified object.

AutoCorrect.Entries(1).Name =

Parent returns an object that represents the parent object of the specified AutoCorrectEntry object.

Dim objParent As Object
Set objParent = AutoCorrect.Entries(1).Parent

RichText true if formatting is stored with the AutoCorrect entry replacement text.

Dim booRichText As Boolean
booRichText = AutoCorrect.Entries(1).RichText

Value returns or sets the value of the AutoCorrect entry.

AutoCorrect.Entries(1).Value =