Table of contents
Collapse the table of content
Expand the table of content

Shape.HasCategory Method (Visio)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Returns True if the specified category is in the shape categories list.


expression . HasCategory( Category )

expression A variable that represents a Shape object.


NameRequired/OptionalData TypeDescription
CategoryRequiredStringThe name of the category.

Return Value



You can pass only a single category for the Category parameter. Passing a semicolon-delimited list of categories produces an Invalid Parameter error.

Categories are user-defined strings that you can use to categorize shapes and thereby to restrict membership in a container. You can define categories in the User.msvShapeCategories cell in the ShapeSheet for a shape. You can define multiple categories for a shape by separating those categories with semi-colons.

© 2018 Microsoft