Style Property

Selection.Style Property (Visio)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Gets or sets the style for a Selection object. Read/write.

expression .Style

expression A variable that represents a Selection object.

Return Value

String

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 the Style propery 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.

Show:
© 2016 Microsoft