ChangeCase Method

Home Page (Objects)OverviewFAQReference

Applies to: TextSelection object

Changes the case of a selection.

Syntax

object**.ChangeCase**case

Parameters

object

An expression that evaluates to a TextSelection object.

case

A string constant of type DsCaseOptions that represents the case of the selection. Possible values are:

  • dsLowercase   Sets all text to lowercase.

  • dsUppercase   Sets all text to uppercase.

  • dsCapitalize   Capitalizes the first letter of each word.

Example

The following example changes the case of the current selection to uppercase:

ActiveDocument.Selection.ChangeCase dsUppercase