A read-only property that returns a reference to the specified TaskPane object from the TaskPanes collection.
expression.Item(ByVal varIndex As Variant) As TaskPane
expression Required. Returns a reference to the TaskPanes collection.
varIndex Required Variant. A numeric expression that specifies the type of task pane. Based on the XdTaskPaneType enumeration.
returns A reference to a TaskPane object.
Security Level
0: Can be accessed without restrictions.
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 TaskPane object that the Item property returns, you can access any of its properties and methods.
Example
In the following example, the Item property of the TaskPanes collection is used to return a reference to a specified TaskPane object:
var objTaskPane;
objTaskPane = XDocument.View.Window.TaskPanes.Item(4);
Because the Item property is the default property of the TaskPanes collection, it can also be used as follows:
var objTaskPane;
objTaskPane = XDocument.View.Window.TaskPanes(4);