Removes the style with the specified name (the Name property) from the style collection of the document. Returns the number of styles, remaining in the collection after the operation.
Applies to: Document object
[[Let] countRet =] object.RemoveStyleByName ( styleName ) |
The RemoveStyleByName method syntax has these parts:
Part | Description |
object | Required. An expression, that returns an instance of the Document object. |
styleName |
Required. An expression that returns a String value. Indicates the name (the Name property) of the style to be removed. |
countRet | Optional. A Long type variable. |
If no style with the specified styleName has been found, the RemoveStyleByName method doesn't remove the style and returns the number of styles in the style collection of the document.
See Also |
Name property, AddStyle method, FindStyle method, RemoveStyle method, RenameStyle method, Style method, StyleByName method, StylesNum method, Style object |