Compartilhar via


Range.Style Property

Word Developer Reference

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.

Bb256042.vs_note(en-us,office.12).gif  Note
Each element of the Characters collection is a Range object.
Visual Basic for Applications
  For each c in Selection.Characters
    MsgBox c.Style
Next c

See Also