AutoCorrect.FirstLetterExceptions Property

Word Developer Reference

Returns a FirstLetterExceptions collection that represents the list of abbreviations after which Word won't automatically capitalize the next letter. Read-only.

Syntax

expression.FirstLetterExceptions

expression   A variable that represents an AutoCorrect object.

Remarks

This list corresponds to the list of AutoCorrect exceptions on the First Letter tab in the AutoCorrect Exceptions dialog box. For information about returning a single member of a collection, see Returning an Object from a Collection.

Example

This example adds "apt." to the list of AutoCorrect First Letter exceptions.

Visual Basic for Applications
  AutoCorrect.FirstLetterExceptions.Add "apt."

This example deletes the specified AutoCorrect First Letter exception if it exists.

Visual Basic for Applications
  Dim strException As String
Dim fleLoop As FirstLetterException
Dim blnMatch As Boolean
Dim intConfirm As Integer

strException = _ InputBox("Enter the First Letter exception to delete.") blnMatch = False

For Each fleLoop in AutoCorrect.FirstLetterExceptions If fleLoop.Name = strException Then blnMatch = True intConfirm = MsgBox("Are you sure you want to delete " _ & fleLoop.Name, 4) If intConfirm = vbYes Then fleLoop.Delete End If End If Next fleLoop

If blnMatch <> True Then MsgBox "There was no First Letter exception: " _ & strException End If

See Also