ID Property

Microsoft Publisher Visual Basic

expression.ID

expression    Required. An expression that returns one of the above objects.

Example

This example displays the type for each shape on the first page of the active publication.

Sub ShapeID()
    Dim shp As Shape
    For Each shp In ActiveDocument.Pages(1).Shapes
        MsgBox shp.ID
    Next shp
End Sub