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
varIndex
Type: System.ObjectA numeric expression that specifies the type of task pane. Based on the XdTaskPaneType enumeration.
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];