FirstLetterExceptions Object
Collapse the table of content
Expand the table of content

FirstLetterExceptions Object (Word)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

A collection of FirstLetterException objects that represent the abbreviations excluded from automatic correction.

The first character following a period is automatically capitalized when the CorrectSentenceCaps property is set to True. The FirstLetterExceptions collection includes exceptions to this behavior (for example, abbreviations such as "addr." and "apt.").

Use the FirstLetterExceptions property to return the FirstLetterExceptions collection. The following example deletes the abbreviation "addr." if it is included in the FirstLetterExceptions collection.

For Each aExcept In AutoCorrect.FirstLetterExceptions 
 If aExcept.Name = "addr." Then aExcept.Delete 
Next aExcept

The following example creates a new document and inserts all the AutoCorrect first-letter exceptions into it.

For Each aExcept In AutoCorrect.FirstLetterExceptions 
 With Selection 
 .InsertAfter aExcept.Name 
 .Collapse Direction:=wdCollapseEnd 
 End With 
Next aExcept

Use the Add method to add an abbreviation to the list of first-letter exceptions. The following example adds the abbreviation "addr." to this list.

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

Use FirstLetterExceptions(Index), where Index is the abbreviation or the index number, to return a single FirstLetterException object. The following example deletes the abbreviation "appt." from the FirstLetterExceptions collection.


The following example displays the name of the first item in the FirstLetterExceptions collection.

MsgBox AutoCorrect.FirstLetterExceptions(1).Name
© 2016 Microsoft