Style Method

Returns an instance of the Style object by the specified ID of the style in the style collection of the document.

Applies to: Document object

Syntax

[[Set] styleRet =] object.Style ( index )

The Style method syntax has these parts:

Part Description
object Required. An expression, that returns a Document object.
index Required. An expression that returns a Long value. Indicates the style index in the style collection of the document.
styleRet Optional. A Style type variable.

Remarks

If index is less than 1 or greater than the number of styles in the style collection of the document, the Style method returns Null. Use the StylesNum method find out the number of styles in the document.

 

See Also

AddStyle method, FindStyle method, RemoveStyle method, RemoveStyleByName method, RenameStyle method, StyleByName method, StylesNum method, Style object