Shape.Style Property
Visio Automation Reference |
Gets or sets the style for a Shape object. Read/write.
Version Information
Version Added: Visio 2.0
Syntax
expression.Style
expression A variable that represents a Shape object.
Return Value
String
Remarks
If a style consists of different text, line, and fill styles, the Style property returns the fill style. If you set the Style property to a nonexistent style, your program generates an error.
To preserve local formatting, use the StyleKeepFmt property.
Beginning with Visio 2002, setting Style to an empty string ("") will cause the master's style to be reapplied to the shape. (Earlier versions generate a "no such style" exception.) If the shape has no master, its style remains unchanged. Setting Style to an empty string is the equivalent of selecting Use master's format in the Text style, Line style, or Fill style list in the Style dialog box (Format menu).
See Also