Class FirstLetterException (Word VBA)

The class FirstLetterException represents an abbreviation excluded from automatic correction. The FirstLetterExceptions object is a member of the FirstLetterExceptions collection.

Set

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

Dim fle as FirstLetterException
Set fle = AutoCorrect.FirstLetterExceptions(Index:=1)

The following procedures can be used to set variables of type FirstLetterException: FirstLetterExceptions.Add, FirstLetterExceptions.Item and AutoCorrect.FirstLetterExceptions

For Each

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

Dim fle As FirstLetterException
For Each fle In AutoCorrect.FirstLetterExceptions
	
Next fle

Delete

Deletes the FirstLetterException object.

AutoCorrect.FirstLetterExceptions(1).Delete

Index

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

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

Name

Returns name of the specified object.

Dim strName As String
strName = AutoCorrect.FirstLetterExceptions(1).Name

Parent

Returns an object that represents the parent object of the specified FirstLetterException object.

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

FirstLetterExceptions.Add

Returns a FirstLetterException object that represents a new exception added to the list of AutoCorrect exceptions.

If the FirstLetterAutoAdd property is True, abbreviations are automatically added to the list of first-letter exceptions.

Syntax : expression.Add (Name)

Name: The word with two initial capital letters that you want Microsoft Word to overlook.

AutoCorrect.FirstLetterExceptions.Add Name:="addr."

FirstLetterExceptions.Count

Returns a Long that represents the number of first letter exceptions in the collection.

Dim lngCount As Long
lngCount = AutoCorrect.FirstLetterExceptions.Count

FirstLetterExceptions.Item

Returns an individual FirstLetterException object in a collection.

Syntax : expression.Item (Index)

Index: The individual object to be returned. Can be a Long indicating the ordinal position or a String representing the name of the individual object.

Dim fle As FirstLetterException
Set fle = AutoCorrect.FirstLetterExceptions(Index:=1)

FirstLetterExceptions.Parent

Returns an object that represents the parent object of the specified FirstLetterExceptions object.

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