Styles.Add Method
Visio Automation Reference |
Adds a new Style object to a Styles collection.
Version Information
Version Added: Visio 2.0
Syntax
expression.Add(StyleName, BasedOn, fIncludesText, fIncludesLine, fIncludesFill)
expression A variable that represents a Styles object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
StyleName | Required | String | The new style name. |
BasedOn | Required | String | The name of the style on which to base the new style. |
fIncludesText | Required | Integer | Zero to disable text attributes, or non-zero to enable them. |
fIncludesLine | Required | Integer | Zero to disable line attributes, or non-zero to enable them. |
fIncludesFill | Required | Integer | Zero to disable fill attributes, or non-zero to enable them. |
Return Value
Style
Remarks
To base the new style on no style, pass a zero-length string ("") for the BasedOn argument.
Example
The following macro shows how to add Style objects to the Styles collection. It shows how to add a new style based on an existing style, as well as how to add a new style created from scratch.
Visual Basic for Applications |
---|
|
See Also