ShowVBAProcedure Method Example

This example sets the focus of the VBA script window to the Click event of Rect2 when Rect2 is contained in the active document.

Dim oPic As Object

Dim oRect As Object

Set oPic = Application.ActiveDocument.Page

Set oRect = oPic.FindObject("Rect2")

oPic.ShowVBAProcedure "Click", oRect