ProgID Property

Microsoft Word Visual Basic

Show All Show All

ProgID Property

Returns the programmatic identifier (ProgID) for the specified OLE object. Read-only String.

expression.ProgID

expression    Required. An expression that returns an OLEFormat object.

Remarks

The ProgID and ClassType properties will (by default) return the same string. However, you can change the ClassType property for DDE links.

Security  Dynamic data exchange (DDE) is an older technology that is not secure. If possible, use a more secure alternative to DDE, such as object linking and embedding (OLE).

For information about programmatic identifiers, see OLE Programmatic Identifiers.

Example

This example loops through all the floating shapes in the active document and sets all linked Microsoft Excel worksheets to be updated automatically.

For Each s In ActiveDocument.Shapes
    If s.Type = msoLinkedOLEObject Then
        If s.OLEFormat.ProgID = "Excel.Sheet" Then
            s.LinkFormat.AutoUpdate = True
        End If
    End If
Next