Syntax
AllCaps [On]
AllCaps()
Remarks
The AllCaps statement adds or removes the all caps character format for the current selection, or controls all caps formatting for characters to be inserted at the insertion point.
Argument | Explanation | |
On | Specifies whether to add or remove the all caps format: 1 Formats the selection as all caps 0 (zero) Removes the all caps format Omitted Toggles the all caps format |
The AllCaps() function returns the following values.
Value | Explanation | |
0 (zero) | If none of the selection is formatted as all caps | |
–1 | If part of the selection is formatted as all caps | |
1 | If all the selection is formatted as all caps |
Example
This example applies the all caps format to the entire selection if part of the selection is formatted as all caps:
If AllCaps() = -1 Then AllCaps 1
See Also
FormatFont