ClassID property

Microsoft Visio Developer Reference

ClassID property

       

Returns the class ID string of a shape representing an ActiveX control or an embedded or linked OLE object.

Version added

4.5

Syntax

strRet = object.ClassID

strRet

String. The class ID of the OLE object represented by the shape.

object

Required. An expression that returns the Shape object to examine.

Remarks

The ClassID property raises an exception if the shape doesn't represent an ActiveX control or OLE 2.0 embedded or linked object. A shape represents an ActiveX control or an OLE 2.0 embedded or linked object if the visTypeIsOLE2 bit (&H8000) is set in the value returned by shpObj.ForeignType.

ClassID returns a string of the form:

{2287DC42-B167-11CE-88E9-002AFDDD917}

This identifies the application that services the object. It might, for example, identify an embedded object on a Visio page as a Microsoft Excel object.

After using a shape's Object property to obtain an Automation interface on the object the shape represents, you might want to obtain the shape's ClassID or ProgID property to determine the methods and properties provided by the interface.