AddProcedure Method Example
This example generates the following code in the ActiveDocument's project:
Public Sub Rect2_DisplayMessage(strMessage As String)
MsgBox strMessage
End Sub
Dim o As Object
Dim lIndex As Long
Set o = Application.ActiveDocument.Page.FindObject("Rect2")
o.Procedures.AddProcedure "DisplayMessage", "strMessage as String", _
" MsgBox strMessage", lIndex