Previous Document Next Document
DataItems.Item

Property Item(IndexOrName As Variant) As DataItem

Member of DataItems

The Item property returns the data item (DataItem object) representing a data field associated with the given shape.

The Item property is the default property and its reference can be omitted when referencing items in the collection. For example, ObjectData.Item(2) is the same as ObjectData(2) — they both reference the second data-item object in the DataItems collection.

The Item property returns a read-only value.

Parameters
Description
IndexOrName
Specifies the item by its name or index number:
Index — Acts as a preset placeholder for each object in the DataItems collection, uniquely identifying each member of the collection
Name — Represents the unique string value that identifies each data item

The following code example displays the name of a data field for an object data item.

Sub FieldName() 
 With ActiveShape.ObjectData.Item(1) 
  MsgBox .DataField.Name 
 End With 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.