Class TwoInitialCapsException (Word VBA)

The class TwoInitialCapsException represents a single initial-capital AutoCorrect exception. The TwoInitialCapsException object is a member of the TwoInitialCapsExceptions collection. The TwoInitialCapsExceptions collection includes all the items listed in the Don't correct box on the INitial CAps tab in the AutoCorrect Exceptions dialog box.

Set

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

Dim tic as TwoInitialCapsException
Set tic = AutoCorrect.TwoInitialCapsExceptions(Index:=1)

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

For Each

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

Dim tic As TwoInitialCapsException
For Each tic In AutoCorrect.TwoInitialCapsExceptions
	
Next tic

Delete

Deletes the specified two initial-capital exception from the collection of AutoCorrect exceptions.

AutoCorrect.TwoInitialCapsExceptions(1).Delete

Index

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

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

Name

Returns the name of the specified object.

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

Parent

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

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

TwoInitialCapsExceptions.Add

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

If the TwoInitialCapsAutoAdd property is True, words are automatically added to the list of initial-capital 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."

TwoInitialCapsExceptions.Count

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

Dim lngCount As Long
lngCount = AutoCorrect.TwoInitialCapsExceptions.Count

TwoInitialCapsExceptions.Item

Returns an individual TwoInitialCapsException 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 tic As TwoInitialCapsException
Set tic = AutoCorrect.TwoInitialCapsExceptions(Index:=1)

TwoInitialCapsExceptions.Parent

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

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