Class TaskPanes (Word VBA)

A collection of TaskPane objects that contains commonly performed tasks in Microsoft Word. To use a TaskPanes class variable it first needs to be instantiated, for example


Dim tps as TaskPanes
Set tps = Application.TaskPanes

For Each

Here is an example of processing the TaskPanes items in a collection.


Dim tpe As TaskPane
For Each tpe In Application.TaskPanes
	
Next tpe

Count

Returns a Long that represents the number of task panes in the collection.


Dim lngCount As Long
lngCount = Application.TaskPanes.Count

Item

Returns the specified task pane as a TaskPane object.

Item (Index)

Index: The specified task pane.


Dim tpe As TaskPane
Set tpe = Application.TaskPanes(Index:=1)