ProgID property

Microsoft Visio Developer Reference

ProgID property

       

Returns the programmatic identifier of a shape representing an ActiveX control, an embedded object, or linked object.

Version added

5.0

Syntax

strRet = object.ProgID

strRet

String. The program identifier of the OLE object represented by the shape.

object

Required. An expression that returns a Shape object.

Remarks

The ProgID 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, an embedded object, or linked object if the ForeignType property returns visTypeIsOLE2 in the value.

Use the ProgID property of a Shape object or OLEObject to obtain the programmatic identifier of the object. Every OLE object class stores a programmatic identifier for itself in the registry. Typically this occurs when the program that services the object installs itself. Client programs use this identifier to identify the object. You are using the Visio identifier when you execute a statement such as GetObject(,"Visio.Application") from a Microsoft Visual Basic program.

These are strings that the ProgID property might return:

Visio.Drawing.5
MSGraph.Chart.5
Forms.CommandButton.1

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