GetProcedureIndex Example

The following example finds the index of the procedure Rect2_DisplayMessage in the ActiveDocument's project.

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