下列示例在ActiveDocument的工程中找到过程Rect2_DisplayMessage的索引。
Dim o As Object
Dim oProc As Object
Dim lIndex As Long
Dim lFound As Long
Set o = Application.ActiveDocument.Page.FindObject("Rect2")
o.Procedures.GetProcedureIndex "DisplayMessage", lIndex, lFound
If (lFound) Then
Set oProc = o.Procedures.Item(lIndex)
End If