Navigate Method

Microsoft Office InfoPath

Show All Show All

Navigate Method

Loads the specified HTML document into the Microsoft Office InfoPath 2003 custom task pane.

expression.Navigate(ByVal bstrURL As String)

expression    Required. An expression that returns a reference to the HTMLTaskPane object.

bstrURL Required String. The Uniform Resource Locator (URL) of the HTML document to navigate to.

Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Remarks

The Navigate method of the HTMLTaskPane object is one of the methods inherited by the TaskPane object when the type of the task pane is 0, which means that it is the custom task pane.

Note  The Navigate method cannot be called during an OnLoad event because the view is not yet loaded when this event occurs, and task panes are associated with the view.

Example

In the following example, the Navigate method of the HTMLTaskPane object is used to load an HTML document into the custom task pane. The HTML document that it loads is one that is included in the form files of the form template:

    var objTaskPane;

// Set a reference to the custom task pane.
objTaskPane = XDocument.View.Window.TaskPanes(0);
objTaskPane.Navigate("taskpane2.htm");