OLEFormat.ProgId property (Publisher)
Returns a String that represents the programmatic identifier (ProgID) for the specified OLE object. Read-only.
Syntax
expression.ProgId
expression A variable that represents an OLEFormat object.
Return value
String
Example
This example loops through all the linked OLE object shapes on the first page of the active document and updates all linked Excel worksheets. This example assumes that there is at least one shape on the first page of the active publication.
Sub UpdateLinkedOLEObject()
Dim shp As Shape
For Each shp In ActiveDocument.Pages(1).Shapes
If shp.Type = msoLinkedOLEObject Then
If shp.OLEFormat.ProgId = "Excel.Sheet" Then
shp.LinkFormat.Update
End If
End If
Next
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.