Renames a style: modifies its Name property.
Applies to: Document object
[[Let] booleanRet =] object.RenameStyle ( originalStyleName, newStyleName ) |
The RemoveStyleByName method syntax has these parts:
Part | Description |
object | Required. An expression, that returns an instance of the Document object. |
originalStyleName | Required. An expression that returns a String value. Represents the name of the style (the Name property) to be renamed. |
newStyleName | Required. An expression that returns a String value. Represents the new name of the style. |
booleanRet | Optional. A Boolean type variable. |
Note, that the name of the style (the Name property) is unique within the scope of the style collection of the document. If there is not style with the specified originalStyleName in the style collection, or a style with newStyleName already exists, the RenameStyle method doesn't rename the style and returns False. If the style was renamed successfully, this method returns True.
See Also |
Name property, AddStyle method, FindStyle method, RemoveStyle method, RemoveStyleByName method, Style method, StyleByName method, StylesNum method, Style object |