Partager via


Range.Style Property (Word)

Returns or sets the style for the specified object. Read/write Variant.

Syntax

expression .Style

expression Required. A variable that represents a Range object.

Remarks

To set this property, specify the local name of the style, an integer, a WdBuiltinStyle constant, or an object that represents the style. When you return the style for a range that includes more than one style, only the first character or paragraph style is returned.

Example

This example displays the style for each character in the selection.

Note

Each element of the Characters collection is a Range object.

For each c in Selection.Characters 
 MsgBox c.Style 
Next c

See Also

Concepts

Range Object

Range Object Members