Share via


TaskPanes.Item Property

Gets a reference to the specified the TaskPaneObject object from the collection.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)

Syntax

'Declaration
'Usage

Parameters

  • varIndex
    A numeric expression that specifies the type of task pane. Based on the XdTaskPaneType enumeration.

Remarks

If the value provided for the varIndex argument does not match any existing member of the collection, an error occurs.

After you have set a reference to the TaskPaneObject object that the Item property returns, you can access any of its properties and methods.

Example

Because the Item property is the default property of the TaskPanesCollection collection, it can be used as follows:

TaskPane taskPane = thisXDocument.View.Window.TaskPanes[4];

See Also

Reference

TaskPanes Interface
TaskPanes Members
Microsoft.Office.Interop.InfoPath Namespace