Share via


HTMLTaskPane.Navigate method

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

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Sub Navigate ( _
    bstrURL As String _
)
'Usage
Dim instance As HTMLTaskPane
Dim bstrURL As String

instance.Navigate(bstrURL)
void Navigate(
    string bstrURL
)

Parameters

  • bstrURL
    Type: System.String

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

Remarks

The Navigate method of the HTMLTaskPaneObject object is one of the methods inherited by the TaskPaneObject 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.

Examples

In the following example, the Navigate method of the HTMLTaskPaneObject 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:

public void CustomTaskPaneNavigation()
{
 // Get a reference to the custom task pane. It is always index [0] in the TaskPanes collection.   
 HTMLTaskPane oTaskPane = (HTMLTaskPane)thisXDocument.View.Window.TaskPanes[0];

 // Navigate based on url specified.
 oTaskPane.Navigate("taskpane2.html");
}

See also

Reference

HTMLTaskPane interface

HTMLTaskPane members

Microsoft.Office.Interop.InfoPath namespace