Show All

# Type Property (HTMLTaskPane Object)

A read-only property that returns a value indicating the type of task pane represented by the HTMLTaskPane object, which is always a custom task pane.

expression.Type

expression Required. An expression that returns a reference to the HTMLTaskPane object. Based on the XdTaskPaneType enumeration.

## Security Level

0: Can be accessed without restrictions.

## Remarks

The Type property of the HTMLTaskPane object is one of the properties inherited from the TaskPane object when the type of the task pane is 0, which means that it is the custom task pane.

Note The Type property is based on the XdTaskPaneType enumeration. These enumerated values are also used as arguments to the Item property of the TaskPanes collection for returning a reference to a specified type of task pane.

## Example

In the following example, the Item property of the TaskPanes collection is used to set a reference to the HTMLTaskPane object that represents the custom task pane. Then the Visible property of the HTMLTaskPane object is used to make the custom task pane appear in the Microsoft Office InfoPath 2003 user interface. The type value of the custom task pane is the same as the value passed to the Item property.

    var objTaskPane;

    objTaskPane = XDocument.View.Window.TaskPanes(0);
    objTaskPane.Visible = true;

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp