RemoveStyle Method

Removes the style with the specified index from the style collection of the document. Returns the number of styles, remaining in the collection after the operation.

Applies to: Document object

Syntax

[[Let] countRet =] object.RemoveStyle ( index )

The RemoveStyle method syntax has these parts:

Part Description
object Required. An expression, that returns an instance of the Document object.
index

Required. An expression that returns a Long value. Indicates the index of the style to be removed in the style collection of the document.

countRet Optional. A Long type variable.

Remarks

If index is less than 1, or greater than the number of styles in the document, the RemoveStyle method doesn't remove the style and returns the number of styles in the style collection of the document.

 

See Also

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