The HTMLWindow property returns a reference to the current HTMLWindow object that is running inside a custom task pane. This property is one of the inherited properties of the TaskPane object available when the type of task pane is 0 (custom task pane). Using this property form, designers can call a scripting function defined inside the HTML task pane.
Note | This property provides the same functionality as the HTMLWindow property but is available only for fully trusted forms. |
The following example uses the HTMLWindow property to set a reference to the custom task pane of a fully trusted form. Once the reference is retrieved, the TaskPaneSwitchView custom function is called, as shown here:
var objHTMLWindow; objHTMLWindow = XDocument.View.Window.TaskPanes(0).HTMLWindow; objHTMLWindow.parentWindow.TaskPaneSwitchView();