expression Required. An expression that returns a reference to the HTMLTaskPaneExternal object.
0: Can be accessed without restrictions.
The Window object returned by the Window property represents the currently active Microsoft Office InfoPath 2003 window that is associated with the custom task pane.
In the following example, the HTMLTaskPaneExternal object is used through the external property of the Dynamic HTML (DHTML) window object to set a reference to the Window object that is part of the InfoPath object model:
var objWindow; objWindow = window.external.Window; objWindow.MailEnvelope.Visible = true;