Item Method
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Item method as it applies to the MailMergeDataFields object.
Returns a MailMergeDataField object from the specified MailMergeDataFields object.
expression.Item(varIndex)
expression Required. An expression that returns one of the above objects.
varIndex Required Variant. The number or name of the field to return.
Item method as it applies to the CellRange, Columns, Fields, MailMergeFilters, ObjectVerbs, Rows, Stories, and TabStops objects.
Returns an individual object in a specified collection.
expression.Item(Index)
expression Required. An expression that returns one of the above objects.
Index Required Long. The number of the object to return.
Item method as it applies to the WebHiddenFields and WebListBoxItems objects.
Returns a String corresponding to the value of a hidden field in a Web form or a list item in a Web list box control.
expression.Item(Index)
expression Required. An expression that returns one of the above objects.
Index Required Variant. The number or name of the field or list box item to return.
Item method as it applies to all the other objects in the Applies to list.
Returns an individual object in a specified collection.
expression.Item(Index)
expression Required. An expression that returns one of the objects in the Applies to list.
Index Required Variant. The number or name of the field or list box item to return.
Example
As it applies to the CellRange object.
This example returns the first cell from a CellRange object.
Dim cllTemp As Cell
Set cllTemp = ActiveDocument.Pages(Index:=1) _
.Shapes(1).Table.Cells.Item(Index:=1)
As it applies to the Columns object.
This example returns the first column from a Columns object.
Dim colTemp As Column
Set colTemp = ActiveDocument.Pages(Index:=1) _
.Shapes(1).Table.Columns.Item(Index:=1)
As it applies to the Fields object.
This example returns the first field from a Fields object.
Dim fldTemp As Field
Set fldTemp = ActiveDocument.Pages(Index:=1) _
.Shapes(1).TextFrame.TextRange.Fields.Item(Index:=1)
As it applies to the GroupShapes, ShapeRange, and Shapes object.
This example returns the first shape inside a grouped shape.
Dim shpTemp As Shape
Set shpTemp = ActiveDocument.Pages(Index:=1) _
.Shapes(1).GroupItems.Item(Index:=1)
As it applies to the MailMergeMappedDataFields object.
This example returns the "City" field from a mapped data fields object.
Dim mmfTemp As MailMergeMappedDataField
Set mmfTemp = ActiveDocument.MailMerge _
.DataSource.MappedDataFields.Item(Index:="City")
As it applies to the TextStyles object.
This example returns the "Normal" text style from the active publication.
Dim txtStyle As TextStyle
Set txtStyle = ActiveDocument.TextStyles.Item(Index:="Normal")