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
ReadOnly Default Property Item ( _
    varIndex As Object _
) As TaskPane
    Get
'Usage
Dim instance As TaskPanes
Dim varIndex As Object
Dim value As TaskPane

value = instance(varIndex)
TaskPane this[
    Object varIndex
] { get; }

Parameters

Property value

Type: Microsoft.Office.Interop.InfoPath.TaskPane

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.

Examples

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